Prodigy makes it official. Starfleet ships have 'sonic toilets!' They make a flushing sound and you can apparently do something to break them by using them, at least if you're a Tellarite.
The only way that makes sense would be if they were actually sonic bidets. They could have reverse replicator toilets though, that dematerialize the bio waste.
I can't help what happened in the show. Jankom used the bathroom and said he broke the sonic toilet. There was a flushing sound as he came out. Maybe it's a sort of holdover thing? Like it makes that sound to let you know that the waste is being removed, but it's a recording?