It is difficult to address the issue because it is a strange problem, but from your story it seems your problem arises from the system connector ( charging port), so try these steps.
1- switch off the device and remove dust/dirt/lint from the port with a paper clip or large needle because it could be causing a short which interferes with the digitizer. Run the paperclip sideways very lightly across the contact points to clean the contacts.
2- open the device and clean the contacts on the home button and press and tape the flex connector at the bottom of the device to ensure proper connection.
3- check that digitizer connector is properly connected.
4-replace digitizer