Chosen Solution
Charging cord has spotty connection to the iphone
The lighting connector may be loose, unfortunately the lighting port cable replacement is a tough job to tackle. Be sure you check other cables, adapters, and outlets to be sure it’s a port problem!
Do the ‘stupid steps’ first, to make sure. EG. cleaning your charging port with 100% isopropyl alcohol or pick it out gently with a wooden toothpick. Make sure your terminals are clean (on both the phone and cable) and that your cable’s functional on other devices. If it still doesn’t work, then yeah you need to change the charging dock, BUT it comes with a free 3.5mm headphone port too! Woohoo? ;D Otherwise you mention spotty, I assume you mean it only charges in certain positions? I assume it only charges when you push the charging cable downwards? :c