I've never seen anything like that before. Straight up weird!
As for a capacitor, you don't need one. They will not stop your headlights from dimming (not that it really pertains to you since you have the opposite going on) but unless you have a ton of speakers, capacitors are a waste of money. Getting a bigger alternator, another battery, or even upgrading your grounds in the engine bay would help, but not a capacitor.
Check your foglight switch to see if it's moving when the bass hits. Either that, or as someone mentioned, it could be two wires being pushed together when the bass hits. Only thing I can think would cause power to go TO your fog lights.