While that temperature may not burn, it is dangerously high. The issue stems from the potential effect on body physiology. In pythons there is clear evidence that the functioning of digestive enzymes is temperature dependent. This is not to be unexpected given the degree of similarity in internal body organs and general biochemical functioning in terrestrial vertebrate groups. Whether
endotherms or ectotherms, they work to achieve a specific or desired body temperature for effective internal functioning. The required temperature range for effective enzymatic action is quite narrow. For example, in humans, less than a half a degree variance from normal average body temperature is taken as a sign of illness. Given that the desired body temperature of nearly all Australian pythons is about 29oC, the potential for overheating by running a part of the enclosure at 40 should be clear. The hot spot, which is to allow a cold or cooled snake to regain overall body heat, should be no hotter than 35. Warm end ambient temperature should be about 32.
You mention having a “cave” hide and the snake using the paper towelling substrate to hide under. This previous post may or may not be relevant, but it is at least worth looking at:
https://www.aussiepythons.com/threa...e-feeding-potential-neuro.229941/post-2549332.
PS. Varanids and agamids in particular appear to different in this respect, but I have not seen any scientific investigations into explaining why.