This is why public utilities use chlorine. The chlorine breaks down when it disinfects, but otherwise has a healthy half life in clean water. The residual chlorine helps keep the water safe while in the system, although it will eventually break down if the water isn’t used. This is one reason you should let a faucet that hasn’t been used in a long time (days/weeks) run a little bit before drinking it.
Ozone can be used to disinfect water, but it has a very short half life, and provides little residual protection. Likewise deep UV light is effective in disinfection, but it has zero residual protection.
Latest Answers