Sometimes its a hit and miss with the battery replacement just make sure you get a good high quality battery for it, It will give the error that its not genuine but it will work afterall. If it continues to get hot, then that will be a board issue. So 50/50 chance of it working and not getting hot. I've replaced many and the phone does not get hot but some people are rough with their phones and thast when it normally happens. good luck, hope this helps.
Make sure there's no corrosion in the port, try cleaning it with alcohol and a toothbrush, or sharp tweezers not wet, maybe not making connection because of lint, other than that, could need a port replacement.
Sounds possible for the keyboard replacement, but also look for any corrosion or burns (depending how long it was before it was opened) and use a soft toothbrush with 91% alcohol to clean it off so it doesn't get worse. Just to be on the safe side and also if you're comfortable taking it apart. Good luck.
I agree with L Pfaff, normally I'd use a soft toothbrush with the alcohol to clean the contacts. Of course make the the brush is clean before gently cleaning the contacts for the battery and any other you have access to. Good luck buddy.