Just using my imagination, we may have used specific cloths for that task and cleaned them up afterwards for repeated use, or perhaps we used leaves.
The Romans used a sea sponge on a stick. Public toilets were open plan with holes over sewers with which to ablute. The stick would then be used to wipe before being washed in running water which would be flowing at the feet and left for the next person.