Why dont you just tell the landlord that the water heater is the fixture of the apartment, and if it breaks through normal wear and tear is always landlord responsibility to fix, just like aircon, oven, water taps, or anything else in the apartment provided to you by the landlord at the time you move in. So you should get the full $31,000 deposit back. Have you said this politely to landlord? I am curious to know what kind of response the landlord will give to this, because to me its such a simple open and shut case that a tenant would never have to pay for something like this.
I really dont like the idea of fighting in court etc like everyone else, but this is so openly obvious that LL would lose, and they must know this if they had even half a brain. Polite but firm "Sorry but the water heater is clearly your responsibility" might knock a bit of sense into them without having to go to court.
I find it a bit strange people are suggesting to get other quotes on water heaters, negotiate on depreciation, etc. This whole area completely landlord responsibility. You pay landlord $2m rent over 6 years for them to deal with this shit and take care of the things that break normally.