A small step was taken toward this end back in the early sixties, in IBM's System/360 model 30 CE school. Seems one of the better students had time enough to pore over the schematics and discover which cores (remember core memory?) were located just beneath the overtemp sensor. He wrote a small program that did nothing but abuse those particular cores by writing ones and zeroes alternately to them, until they heated up, and the temperature sensor shut down the machine.
First, of course, the program printed out "Programmed Power Down" on the console. Caused a lot of bewilderment among the students and instructors. Especially since the big feature being touted about the S/360 was that it was so oriented to multiprogramming that it didn't even have a HALT instruction.