So sorry for your loss. This is painful - as we all are so intent on the complex and challenging task of nurturing the delicate life forms on our charge.
In the big picture, equipment is the cheapest investment we make. Proactive equipment maintenence is a very wise course. So is eliminating single points of failure where possible. If a heater failure can cause disaster by letting the water get too cold, run two in parallel. If a stuck thermostat can cause death by overheating - run a 2nd thermostat in series. All the modern controllers (Neptune, Reefkeeper, etc.) have independent temperature sensing and heater control logic. If used for nothing else, these provide cheap insurance against heartache.
The old reefer's adage: "Nothing happens fast, except disasters." comes to mind, and of course, defective heaters are not the only opportunity for us to induce disaster. Eternal vigilance, careful husbandry, and prayers for good fortune are the reefers currency.