The problems of lack of investment in the sewage system go back before Brexit.
A material deterioration of the entire water infrastructure started in 2011 when the Tories go voted in.
They gutted the environmental regulator responsible for checking the pollutions levels around beaches and rivers. And they also allowed the water companies to "self-regulate" in terms of keeping track of the sewage discharges.
Thats when things got much, much worse as water companies under-reported the discharges and the regulatory body stopped checking the pollution levels.
So this is a Tory-caused problem with Brexit simply accelerating the problem they caused.
Being in the EU would have slowed down the discharges because there would have been harsher consequences for lying about the discharges.
There is now a huge legal case against Severn Trent because they were allowed to charge consumers more (because they declared fewer discharges) even though there is evidence now they consistently lied about the amount and size of those discharges.