According to some this term refers to the partial deck that is built above the ship’s main afterdeck in the stern. An enclosing was rigged aft of the deck over the sea to meet the needs of nature. When a wave would wash over the stern of the vessel it was said to be ‘pooped.’
Cute story but not quite the reality. The name ‘poop deck’ is derived from the French word for stern, la poupe, which is rooted in the Latin term puppis.
Technically this was a ‘stern deck’ roof on the cabin in the back of a ship. On a vessel with sails the poop deck was generally elevated from the roof. It was the “after” or “aft” cabin and also known as the “poop cabin.” This structure made it easier for the captain and helmsman at the stern to have a view of the entire working crew, the sails and to be better able to see when navigating.
The poop deck has been moved on modern warships to the bridge which is usually located in the center of a ship or on the starboard side island of an aircraft carrier.
For those that lean toward the first explanation, well, we’ve kinda poo-pooed that idea.