This lens isssue is common in many digital lenses wher a slip ring type potentiometer is used.
These are formed around the barrel using plastic conductive curved plastic with carbon impregnated resitive strips.
The wiper contatcts sprain and fail leaving the potentiometer open circuit! the only solution is replacement. I know this because im a lens tech from the broadcast camera days.
Take a photo of a bright monochromatic surface (e.g. sky, white wall) with a very small aperture (F/22 or so). Do you now see clearly defined specks? If yes, there's dust on your sensor.