Solution

 

Mandate that any factory put its own water intake at the downstream end, and its water discharge at the upstream end, of the factory site.