Can’t you just go onto the transporter?
pretty sure you can, would be strange if transporters can’t handle gases…
The smell won’t stay on the transport pad, you’d have to transport the whole room.
Do it somewhere on the holodeck.
The more you know!
https://memory-alpha.fandom.com/wiki/Bathroom
The head was visible in a few episodes, but while the doorway was initially labeled “CONFERENCE” in “Gambit, Part II”, it was relabelled “HEAD” by “Emergence”. In addition, in episodes throughout the seventh season, multiple crew members can be seen simultaneously entering the bridge via the head. It is unclear how many toilets are available for use in the head on the main bridge.
I can’t find the exact timestamp but Jonathan Frakes does point out the single bathroom on the Enterprise D in the 1994 documentary “Journey’s End: The Saga of Star Trek — The Next Generation.”
But why would you use it when you can just use the holodeck? (crude humor warning)
My headcanon is that in public / guest quarters the toilet stalls contain miniature holodeck emitters so that they can instantly change to accommodate the customs / biology of any species. Even assuming that, say, Klingons excrete waste from the same places that humans do, they might prefer to do so while dangling from a bar in the ceiling or something else torturous like that, and find the use of a regular sitting toilet unclean or dishonorable.