Recently my iPad Air has developed some issues with charging - I’ll plug it in for a day and then discover it’s not charged at all, toggle the socket and suddenly it’s charging fine - I suspect a port issue.
That was how my iPhone 7 was behaving when it had some pocket lint at the bottom of the port.