There were projects in India working on far-reaching technological solutions to the need for community toilets. Basically, I said that there is a well-known logistical solution and it is septic tanks:
https://en.wikipedia.org/wiki/Septic_tank
I went on to say that the community toilet buildings could be themed with stainless-steel roofs that funnel rainwater into stainless-steel tanks such that the rainwater is used to flush the toilets. Of course the stainless-steel tanks could also have outdoor faucets for drinking water.
Now one county, that I am familiar-with in the U.S., requires building lots to be one acre in size to use a septic tank. Also, the ground has to pass percolation tests to qualify for septic tank use. But don't forget the drain-field which leads to the next item.
A large project such as a city or county could use wetland areas to process treated waste water instead of just discharging into a river. Here are links to an internationally renowned project:
http://sewaneewetlands.org/case-study-the-clayton-county-constructed-wetlands
http://www.gwri.gatech.edu/sites/default/files/files/docs/2005/ThomasMike%20paper%20April%2013.pdf
https://www.npr.org/templates/story/story.php?storyId=90043021
https://www.wwdmag.com/ccwa-completes-phase-i-huie-constructed-wetlands-project
https://www.accesswater.org/publications/-287961/design-and-construction-of-treatment-wetlands-on-a-sloping-site
https://www.accesswater.org/?fileid=-30106
https://www.georgiatrend.com/2008/12/01/water-solutions/
I listed a large number of links because I was looking for something like several miles of flow through rocky creeks before reaching large slow moving wetlands. What I found was that the waste-treatment plant pumps to a 55 acre constructed wetlands of successive ponds that eventually flow into a reservoir. Of course the constructed wetlands do grow-up with natural vegetation. Also, there is surrounding acreage.
http://sewaneewetlands.org/constructed-wetlands
But here is the original link that includes constructed wetlands for small projects:
https://en.wikipedia.org/wiki/Constructed_wetland#:~:text=A%20constructed%20wetland%20(CW)%20is,areas%20lost%20to%20land%20development
Now I am looking for information on a city park project that sends sewer-line overflow into a rocky creek.