Only my cable can recharge my iPhone
Although it was not exactly the same symptoms, I had many connection problems with my iPhone 5S at some point. I could use only some cables, and only in some positions. It turned out that the connector had gathered a large amount of dust (likely gathered in my pocket) that was "compressed" down the socket by plugging the cable. At some point, the thickness of this dust made it impossible to have a proper connection. This is hardly visible with the naked eye, but I eventually discovered it by looking at the connector with a light and a loupe. I then took away the dust using a sharp pin and the iPhone worked again perfectly.