It seems like either dirty contacts or something broken in the lens. Try cleaning the contacts with a good contact cleaner, such as DeOxit. Try to get one that is formulated for plated contacts. If that doesn't work, getting a new normal zoom is probably cheaper than having your basic kit lens repaired.
The lack of manual focus when the electrics don't work is a major drawback of the AF-P lenses. As long as things work, they are better than the AF-S equivalents, but there is no backup system if things go wrong.
Thanks man, I'll try that.
Do you generally use the af-p or af-s? I might have to go lens hunting soon