More accurately, regulation of private water and sewerage companies has been going badly. The curiosity is that it was allowed to go on and on and on until we get to this point.
I often date the reduction in the quality of regulation in this country to the institutional changes brought in by Blair government. Previously regulators had a sole Director General, who was where the bucked stopped, both for policy and the management of the organisation. Blair changed this into a separated structure, with a Chief Executive who managed the organisation, and a Board who were responsible for policy. The Board comprised (typically) a 2-day-per week chairman and about 4 other 1-day-per-week board members. So the CE, who was getting the staff to do the work to support policy, was not responsible for the results of that work, as decisions were made by these part-timers who were remote from the policy work being carried out, and had little time to get to grips with it. It is often suspected Blair made this change to extend his powers of patronage, put "suitable" people on the board, and exercise some influence over the alarmingly independent-minded regulators, such as Sir Ian Byatt the former water Director General. So I think this is when the quality of regulatory decisions went down.
In relation to Thames Water, it was already evident to many there was a problem as long ago as the mid-2000s. Thames Water was first taken private in 2001 when it was bought by Germany multi-utility RWE. Those same issues of poor performance, just the same faults, persisted in RWE's day - high leakage, repeatedly prosecuted for pollution. It was widely understood that dealing with leakage in densely populated urban areas is expensive, and that's why they weren't doing very much. Similar issue with the sewers, so many of them the original Bazalgette sewers from the 19th century which had been so well built they had lasted. But with pressure over the level of water charges, it was too toxic a point to deal with.
It is generally understood RWE sold it because they felt couldn't fix the performance within the available funding from permitted charges to customers. As a multi-utility, we surmise that the very publicly reported poor performance was bad for their reputation. Nevertheless, to my surprise, they made a good profit by selling it on. But evidently by by selling it on to people with a purely financial reputation, who were measured by the bottom line they achieved, and had less worry about leaking and overflowing pipes.
The overflows have been relieved to some important degree, since those days, by the Thames Tideway Tunnel, a sewerage megascheme to deal with a shortage of sewerage capacity. Though there were many back then that felt that a more rigorous local approach would have been cheaper and more effective. The tunnel deals with the capacity shortage at a high level, but would leave many localised capacity shortages, which I guess is why Thames is still in the poo over this. But as time went on without doing that localised work, the need for the expensive tunnel grew. Having got to that point, the government were actually quite clever in taking the financing of the tunnel out of Thames' hands, and getting very cheap private finance for it, by de-risking it. A much more continental approach for once. A rare piece of good financial design, short of using public finance.