Chosen Solution
hhhhhhhhhhhhheeeeeeeeeeeellllllllllllpppppppp
Charging port is probably faulty. Have you tried going to a mobile phone repair shop to see how much they charge to replace the charging port? It’s fairly easy to do in my opinion. Where to buy the replacement part: HTC One (M8, Sprint) Charging Assembly Guide to replace the part: HTC One M8 Headphone Jack/Micro USB Board Replacement