I had the same on one of my vintage P basses, almost identical to the symptoms you have described. I replaced the output socket, figuring that even if it were to affect resale value, I would rather have a playable instrument.
I also eventually replaced the volume pot. Switch cleaner would help for a while but the problem would return.
I kept the original parts and passed them on when I sold the bass.
I sold the bass, for the price I wanted, so never regretted carry out those essential repairs.