Aiding some of your thoughts –
It’s really important that your “Waste” piping isn’t just liquid through an through, it wouldn’t flow if that were the case. There is a second pipe, called a ‘vent’ pipe that keeps your waste piping ‘breathing’. So when you flush a toilet, essentially the waste water ‘falls’ down from your toilet, inside a pipe, into your home’s “sanitary main”, the vent allows this whole system to be ‘breathing’, which I mean prevents and clogs and things forming vacuums and blocking the entire piping system.
Your sanitary main gets connected to a bigger waste main in the street and it’s a series of bigger pipes back to the sewage treatment plant. If you have areas with hills or valleys or something, you’ll have big ‘pump houses’ which now that I’ve mentioned them you’ll notice scattered around, they look fancy garden sheds with lots of pipes around on street corners. These pump houses *pump* the dookies up-hill to reach the plant.
Treatment plants use a mixture of filtration (separating out the dookies, condoms, New Jersey Beach Whistles & other solid stuff) and fermentation to breakdown the waste in something less toxic and then they dilute it with tons and tons of clean water typically by dumping it into the ocean or a river.
Many areas in the US also use a conjoined storm water/waste water system which means even modest rain fall can overwhelm the treatment plants and they just open the sluice and dump the waste/rain directly into the ocean/river and hope for the best.