When you gotta go, you gotta go, but there are ways to modify one's behavior
During the war my father worked on the development of RADAR. He was one of a number of RAF corporals who slept in a long hut with a pot-bellied boiler at the far end. There was a large steel sheet on the floor upon which was a smaller asbestos sheet carrying the boiler and a fire bucket.
Following an evening’s beery relaxation, all but one would go outside the hut and relieve themselves on the grass as bladder pressure built up. But there was one guy who insisted on relieving himself in the fire bucket.
Having access to some fairly substantial capacitors used to power the cavity magnetrons, the irked members of the hut connected a fully charged capacitor to the bucket and the metal plate.
The sudden crack of a discharging capacitor and the accompanying cry of pain at 02:00 hours signalled an end to the unpleasantness.