There is no “head” or bathroom on this particular boat.
The pirates relieve themselves in the ocean, from the deck.
It is not like they stay below deck, all the time.
Well, the Captain prolly tried to get away whilst taking a poop from the poopdeck. But,,, after that attempt? I’ll bet they’re wallowing in feces inside. Or using a can, and dumping it.