Lavatory was working fine at first, then I built a shower. After that, the lavatory was going through a flushing animation repeatedly when the shower was in use. Finally, after restarting the game, the lavatory was detected as out-of-order (although the tooltip for the lavatory said it was "ready") and duplicants began peeing into the water reservoir. At times during this mayhem, there was a "no restrooms built" warning, but not always. Disabling and enabling the lavatory would make it usable again, but very briefly.
Also, a related priority issue. After I fixed the lavatory piping (yes, fixing the piping removed the issue), duplicants were still doing multiple tasks and messing themselves before going to the bathroom. Have you considered queuing them up outside the bathroom doors when they need to go? Would be a good indicator for when a new lavatory is needed. Granted, waiting in a queue should probably be lower priority than, say, "holy ****, the base is decompressing" or something like that.
The lavatory was already connected and dispensing contaminated water into a reservoir. When I connected the shower, I connected its output to the lavatory's output, rather than circling around and connecting to a pipe segment. I'm pretty confident that the effluent eco-disaster resulted from this. After that, you should be one restart away from sewage in your mush bars.