Feacal matter wise - you can control the food volume you consume during the day (many stick to liquid diets during the day, with a heavy meal at night once the anal work is done).
Prior to the big even you also can have a wash out of ur arse, and get rid of any feaces lingering up there. The problem is you have 1-2 hour window before my feaces can then enter that region (if eg, you had a big meal and were pushing food down).
It's not easy. It's why most sexually active ladyboys are thin.