I think it could be the flex cable that connects the lens assembly to the main camera. It goes into the lens assembly over quite a sharp angle in its aluminium chassis, and often tears or breaks right at that spot. It could just be beginning to break, which is why the issue is intermittent.
The flex cable you might need to replace is part number LF-2117. If you spot that it's begun to split at the point where it goes into the floating lens assembly, then that's likely your issue. If it is, it's probably a good idea to do some work on the slot in the chassis that it goes through, while you have the broken one removed. The edge on mine was very sharp and rough. The connector is not expensive.
Here's one in the UK: [link|https://spares4hisense.co.uk/sony-flexi-print-connector-lf-2117-flexible-pwb|https://spares4hisense.co.uk/sony-flexi-print-connector-lf-2117-flexible-pwb|new_window=true]
And here's the disassembly manual: [link|https://spares4hisense.co.uk/sony-flexi-print-connector-lf-2117-flexible-pwb|https://spares4hisense.co.uk/sony-flexi-print-connector-lf-2117-flexible-pwb|new_window=true]
It's best to print out two copies of the disassembly part of the manual. One to work from and one to tape the screws to in their relevant positions, so you never lose them or put them back in the wrong place. You won't need insane skills to do this. I've done it to mine twice.
There are other possible causes, but i'd check that flex connector first, cus it's very common for it to break in the Sony FDR cameras with the floating gimbal inside.