Thames Water has £23bn of assets that are in urgent need of repair and the supply of water to its 16 million customers is “on a knife-edge”.