I don't know why restarting clears some things, but that's happened for me too. Sometimes it helps when animals are constantly escaping from a particular enclosure they'd never escaped from before (though not always).
I ran into the filthy toiled issue in one zoo. It was kind of funny (if annoying). The uncleaned toilet had all this "crud" on its tiles, miasmatic clouds of stench, and flies buzzing around, while guests walked out holding their noses.
I actually found it worked better not to assign the toilets or cleanup workers to any workzones. This seems to bypass the issue where if there are animals being moved in that particular work zone, the maintenance crew gets distracted for too long to clean the toilets and no other worker will step in.
I have not had issues with broken toilets in the game at all, though, even though my maintenance workers are assigned to work zones based on habitats and my toilets are not in work zones. I remember one of the scenarios where toilets and other zoo facilities were all broken at the beginning, and there was an animation with water squirting out of the doorways of the broken toilet facilities. But I've never seen that in one of my own zoos. I don't think the broken toilet is the same as the dirty toilet animation.