If it was genuinely that hot unless you need to recover the data (even then, the CPU needs to work for the encryption key), that phone is thoroughly unrepairable. Time for a new phone.
If you want another iPhone, look for either a Xs or a SE (2020) for 4G, but if you can swing the cost the 12 isn’t a bad device. With the 13 on the way, the 12 will become reasonably affordable soon due to market flooding.