I always assumed that the Enterprise-D had more than one toilet. And that the failure of a toilet aboard ship would make an excellent disaster story.
*cue mid-nineties TNG promo music*
"Next time, on Star Trek: The Next Generation, Worf is in harm's way when the pressure seal on his toilet fails catastrophically, leaving only his Klingon butt cheeks standing in the way of the ship's explosive decompression. Will Geordi win the race against the clock to save both his friend AND the Enterprise? Tune in next week to find out!"