Pro tip: 95% of the problems with the power connectors are due to dust trapped inside the charge hole. Yes, there is a lot of dust in there, even if you can't see it. No worries though. You can solve that problem in 2 minutes. Here's how:
1 take a clip, or something similar (thin and rigid) and use it to dig out the dust from the connector hole in your phone
2 be surprised at how much dust you actually find
3 keep digging out the dust
4 your phone is as new! Try charging it and you will see that it won't disconnect randomly anymore.
Hope it helps :)
p.s: We charge 10-15 euros for that in the store, and obviously don't tell how easily we got it fixed to the customer. I know, it's funny and infuriating.