Waste-water treatment systems are not normally designed to remove compounds that are not bio-degradable. The problems come when large enough amounts of such compounds go through the waste-water system and are then discharged back into the environment, i.e., into streams or lakes. Some photo chemicals degrade or are changed to benign stable compounds during waste-water treatment, some aren't. Still, even those that aren't may not pose a problem if the overall amount is insignificantly small, which is likely the case with lots of photochemicals.
Trying to keep toxic substances out of the environment is laudable. Doing a bit of research about the chemicals one uses and the local regulations regarding dumping the chemicals that one does use should enable one to make an informed and responsible decision.
Now if we could only find a way to deal with the PFAS, microplastics, prescription and non-prescription drugs and other things that find their way into the environment by way of the water-treatment facilities, we'd be making real progress.
I worked with the Austrian water and sanitation oversight board for years. There were problems with such things as mutated and hermaphroditic fish caused by hormones from birth-control pills making it into the environment through the sewer system among others. There are a lot bigger problems than those caused by photo chemicals.
Best,
Doremus