Replaced overflow switch and pressure tube, which was full on gunk. Then needed to blow out the air chamber on the drum with compressed air before the switch would work properly.
The fault was probably due to gunk (a good technical term) in the air chamber and the pressure tube, and maybe the switch itself, causing the pressure switch not to close properly which burned its contacts and made it intermittent.