Question: what to do when your charger goes on and off?
Answer: Dust in the USB/Lightning port - clean it out with either dust off - or delicately remove the dust with a paperclip. No more issues. Works like a charm.