You don't really control the upstream: someone flushing their toilet, or a laundromat dumping solvents down the drain?
But it's a solved problem to continually test the incoming water supply for the basics (pH, TDS). Plus intermittent checks for full workup (heavy metals, etc).
After that, it's a question of working it through the appropriate steps to get it to the state you want. Sort of like a continuously operating manufacturing line, except you get to blend the product at the end and only have to QA the blended result.
As someone quipped, "Dilution is the solution." Given enough volume and time, you can dilute even an arbitrarily large amount of lead to safe levels.
His verdict: 9/10 it's rat feces at the processing or packaging plant.
But from a marketing perspective, field crop contamination is an act of God. Can't be helped.
Plant contamination would actually mean someone was at fault. And would require (expensive) changes.
So reclaimed water is typically dealing with "anything anyone puts down a piped drain in their house."
(That said, I think there are also runoff processing requirements before discharge into waterways too)