I have a full maille kit for reenactment. I can easily pee while wearing it. I only have to remove my gloves and helmet (so I can see what I'm doing). Defecating is harder but not impossible, but I just go before gearing up. I don't have armour on all day during reenactment events.
I've seen some armour with a metallic 'cod piece'. Some of the more extreme examples here.
https://www.tumblr.com/petermorwood/133331041560/15th-and-16...
I assume that must have been detachable?
It's possible but dangerous to do. You open yourself up to attacks when trying to attack someone's groin from below.
> I assume that must have been detachable?
I'm not sure. A lot of them don't look detachable, being partially covered by other armour pieces.