Those are residential systems. At the municipal level it is more often done with bacteria in large tanks.
It's not unlike brewing beer in that you need to adapt your recipe constantly to account for variations in inputs in order to get a consistent product out the other end.
I was about to say, I happen to have aquascaping / aquariums as a hobby and getting the right bacteria in your water and keeping those in balance is a crucial part of keeping nitrates down.
https://www.freshwatersystems.com/blogs/blog/how-to-remove-n...