|"...it's quite possible the USB plug on the web cam cord is damaged, or one or more wires in the cable are damaged, probably near the plug."|
"People often pull on the cord rather than the plug on the end of the cord when they disconnect things, or those things could be damaged at any time by yanking on the cord."
Wiggle the cord near the plug to see if you get the symptoms / don't get them. If that's your case, a wire inside the cord may be broken near the plug but the insulation where it is broken is intact - in that case, if the broken wire ends still touch each other the connection will be intermittant and unreliable - it will work okay sometimes, sometimes it won't.
The same thing can happen to corded mice, keyboards, other corded things.
Sometimes the USB port is physically damaged. The USB plug should be a snug fit - not be loose in the port. Sometimes the outer metal shell of the port gets bent, or the outer shell of the plug gets bent, or the plastic blocking plug that prevents you from plugging in a plug upside down may be loose or missing in the plug or in the port, or the contacts inside the plug or the port may be bent.