Computers are designed to shut down automatically anyway if they overheat, in order to prevent permanent damage to components. You don't need an app for that.
The best you can do is install temperature monitoring software to keep an eye on temps.
Ensure your system has adequate cooling to start with, and keep the internal components free from dust accumulation by regular cleaning with an air-duster.