Thames Water saw a 40% increase in pollution incidents in the first half of the year as its debts continued to swell.