One thing to try to help isolate the problem is to open the control cavity and switch the
pickup leads (plug the neck pickup in where the bridge pickup was, etc.) so that the panning control now works backwards from the way it did before. Since this is an occassional problem, you may have to leave the leads switched for a while until the problem happens again. When it does happen the problem will probably move to the other pickup, or it may stay with the same pickup. If this actually fixes the problem, then one of the leads might not have been completely plugged in.
I'm not sure why plugging and unplugging the cable several times fixes the problem; but here are some jack related things to do.
- Have you tried a different instrument cable?
- Try plugging and unplugging the cable 30 times in a row (cleans the jack).
- You could also try cleaning the contacts on the jack with a cotton swab and
switch cleaner.
But my guess is that this is not a jack problem.