Prevent runaway threads and ultimately physical overheating and battery drain on Android
As noted in the comment, "battery drain" and "overheating" are not necessarily connected: not everything that drains your battery causes overheating. Overheating is most likely caused by excessive CPU hogging (which of course also leads to battery drain).

You might want to take a look at the app DrainGuard, which keeps a log of battery consumption, always informs you how much was consumed since you turned the screen off last time, and -- here it comes -- it can start an alarm when some app causes excessive battery drain. Values are configurable:

 

The free version only works from 100% charge down to 70%, which is fine for testing. Once you decided the app serves your purpose, the DrainGuard PRO Key is available on the playstore for less than an Euro.