My water heater is controlled from a switch on the mains 240volt control panel as marked in the first photo below. That switch is fed power from the rear side of the mains breaker switch as shown in the second photo. Examining the reverse of the mains panel and looking at the reverse of the water heater switch which is next to the mains breaker will show the live and neutral connections coming into the switch from the mains breaker. Unfortunately I don’t remember which of the wires on the breaker switch connected to the water heater, but this should be easy to see with the mains panel removed from the bulkhead.
WARNING, REMEMBER TO UNPLUG YOUR MAINS SUPPLY CABLE AND TAKE STEPS TO ENSURE THAT IT CANNOT BE RECONNECTED WHILE YOU ARE WORKING ON THE MAINS PANEL.
To remove the mains panel there are four fixed bolts, one in each corner of the mains panel and to which there is a wing nut securing each of the bolts. With the power off you can reach behind the mains panel to unscrew each of the wing nuts, and the panel can then be pulled away from the plywood bulkhead. The neutral wire is attached into the first layer of connections to the breaker with the positive wire is connected into one of the second layers of connections.
To replace the mains panel simply insert the bolts on the reverse of the panel into their respective holes in the plywood bulkhead. Next comes the tricky bit of replacing a wing nut onto each of the bolts without dropping it into the myriad of wires you can feel behind that panel, but which many you can’t see let alone feel your way past to pick up a lone wing nut. Good luck with that !!