Check the battery out, try replacing it but I don't think it could help much... Most probably problems with the logic board. Usually it acts like that after water damage...
"similar problem: overheating as above, and after about a month the logic board died completely. i bought another phone (older and with many signs of wear), swapped the board - same issue. swapped the battery - same issue. seemingly must be some other component. the camera suggestion from Linda gives me some hope - was it the big, rear-facing camera? i will check this. any other suggestions? would love not to test components one by one.