The High Court has been told that allowing Thames Water to run out of money by not approving restructuring plans is “a risk which cannot be run”.