The Indus Valley civilization had very good sewage systems. We know this from the archeologists that found the ruins of their cities. They had brick tunnels under the cities which led out of the city and dumped out the waste.
Each house had its own brick toilet that led straight to the sewage system. Each house had a hole in one of the rooms in their houses. This place was the bathroom. In the bathroom, they would take baths, and they would use the restroom.
At the top of every house, there was a drain that collected rain water and drained it into the sewer. Every once in a while, a plumber had to make a hole in the sidewalk to check if the sewer was working or if it was blocked up.