You have properly identified the issue. USB (ans SATA) have a limited life as far as plug/unplug is concerned. In this particular case, the contact pressure is inadequate. A new cable might solve the issue.
On my Nikon DSLR, I do not unplug the USB cable. This is a little inconvenient, but works well.
I got over the problem by doing a complete virus/malware check and then reinstalling the Nikon S3000 driver via the Device Manager. No idea why it got corrupted in the first place, but obviously something untoward happened. I didn't think it was a cable/connection fault as the cable worked elsewhere and my spare cable didn't solve the problem. Thanks anyway.