I would have thought they would have had them on a pretty serious diet for a couple of days before and during the mission to avoid such items
They do. I read about it recently. Apparently, though, it does not eliminate (no pun intended), but only minimizes.
I think it’s referred to as a “low residue” diet.
I think a saw an interview with Jim Lovell about an extended Gemini mission, with rendezvous.
Towards the end, can’t remember if it was Lovell, but one had go #2. It was a messy production back then, especially in an even smaller vehicle, so the bathroom humor was “We only have 36 hours more. Can’t you hold it?”
I thought, how nice, they wanted to treat the astronauts to a good meal.
Before they were eating powdered liquids, and freeze-dried provisions on board.
Now I realize they were trying to plug up the guys systems, so they wouldn't *need* to poop too often.