Sound like you have tried a lot of stuff. I know you have an iphone 5 though you might still have the same issue. iPhone 4S (and older) with a dirty/defect docking connector showed just these symptoms. You should check your lightning connector. Start by cleaning it prperly. If that does not help, try to replace it.
I contacted the battery first, using the connector and cable as a reference point. I wanted to make sure the cable from the battery did not put any stress on the battery connector after I glued the battery to the case.
Instead of using a heat gun/hair dryer (I do not have one) — I used the coins trick, and put a kettle on top that I filled with hot water. I used water at around 80ºC. The weight of the kettle also provides additional pressure, making sure you get a good seal. To cool it down, simply add some additional cold water to the kettle.