I had a digital do that to me. I run all mechanical now. I have had two of them fail, let me amend that, I had two of them almost fail.
Mechanical timers have always let me know ahead of time before they fail, usually loud noise and heat. I change them out immediately at any unusual grinding noise or warmth. No surprises.
intermatic timer FTW
40$ at home depot or any hardware store...just ask the guys there for a 220v hot water tank heater..he'll point you in the right direction