I'm 99% convinced the Lightning connector is just plain defective.
I had an iPod touch 5 which I eventually had to toss as it just wouldn't charge. I had cable after cable (all from Apple) die on me, then finally even new cables wouldn't work.
At some point I figured out that Amazon's "Amazon Basics" lightning cables actually seem to be more reliable than Apple's. (Cheaper too, which is a nice side benefit.)
At any rate despite horrible experiences with my iPod touch 5 and lightning in general, I bought an iPhone 5s last October. I babied that thing like crazy! I bought all new cables, so in case something had somehow contaminated cables I'd used with my iPod nano or iPod touch, it wouldn't wreck my iPhone. I bought 3 docks, so that the lightning connector would never touch the ground or a table or my hand or anything else...it can only touch the iPhone's connector.
I also tried to use my iPhone as little as possible. I mostly only moved it from my cradle at home to a slot for it in my bag to its cradle at work. I mostly used other mobile devices where I really should have been using my iPhone, just to try to baby the iPhone.
Well, it all lasted longer than it had with my iPod touch and nano, but yesterday with no warning it wouldn't charge, then gave an invalid accessory error, then quit working altogether.
I put way, way WAY more use into my iPad 2, my iPad classic, etc., don't baby them 1/4 as much, and don't have this problem. (not to mention my horrible Nexus 7, my portable game consoles, etc...all of which aren't babied 1/4 as much as I've been babying this 5s, expecting this to happen).
Since it's only been 10 months, I guess I'll try wiping my 5s (while it still has power) and calling Apple, but at this point I don't trust lightning at all. I've scrapped plans to buy another iPad, I'm 99% confident even if Apple replaces my phone it'll just die again, and I just can't justify getting another device that uses lightning.
Been super annoyed by some comments I've read around the internet that people are damaging it themselves...it's like no, I could not possibly have been more careful with this save for LEAVING IT IN THE BOX when I bought it back in October. I do not roll the cables. I do not bend the cables. I do not transport the cables. While there could be microscopic lint particles or something from when I stick it in my completely clean jeans, it's nothing that ALL OTHER HARDWARE can't handle without any issues whatsoever.
Super frustrated as I really hate Android and neither Android nor Windows Phone handles syncing and podcasts and things like that anywhere near as well as Apple *sigh*