Sorry for your loss.
Let me see if I can clear some things up for you.
Placing the heat mat in the enclosure under the substrate on a thermostat is not a fire hazard at all. "Most types of wood will start combusting at about 300 degrees Celsius." If you are keeping it at 23-25c then the likely hood of a fire from it is low. Can electronics fail? Anything is possible. Heat pads and heat panels are used in wooden enclosures all the time without fires. The snake lays on the heat pad for belly heat. If it is on the side will not provide belly heat, only ambient heat and that would be IMO not enough heat. Ceramic heat emitters can be used safely if inside a guard.
https://www.amazon.com/gp/product/B0...ZSUT9VPR&psc=1 plus.... https://www.amazon.com/dp/B075KFFVVM...1-2d3cf013dad7 Is an ok way to go if you have https://www.amazon.com/Heater-Guard-...ords=CHE+guard
That way you have heat and control over the heat and there is no way the snake can get to the heat source. Your hot spot should be 31C (89F) if my conversion is correct.
Also Ball Pythons do not require light cycle but is ok to provide it if you like. They prefer to hide over being seen so darkness all time should have no bad effect on the animal is my understanding. The light is for our benefit to see them not theirs.
I am sure others will chime in with better or more advice but welcome and best wishes.