Nobody does this, but if you TRULY want to cure headlight dimming --
Go to the headlight harness at one of the lights. Figure out which wire is the 12v+ feed (you will probably need a dmm for this). Trace the wire back to where it joins the other light.
Cut the wire.
Install a 1F stiffening capacitor there (or 1/2F if you can find one). Your lights won't dim.
Nobody does this, largely because the "I gotta have a cap" crowd is brain dead, and it's a little work. Obviously, you'd need to acquire some electrical know-how, or find a friend with some. Plus, you'd need to physically mount the cap somewhere which could be a little challenging.
But it will absolutely cure headlight dimming.
Installing a cap near the amps doesn't do much for the head lights. In the rare cases that it helps it's basically a fluke.
Personally - unless the dimming is bad enough to effect your driving or oncoming traffic appears to be responding to it - I wouldn't worry about it.
For the past ~10 yrs I've had a little dimming at high volume. It's just the nature of a powerful sound system.
Power windows dim the lights a little.
Power seats dim the lights a little.
Radiator fan dims the lights a little.
It's just how 12v works.
For that matter -- my wifes blow drier dims the house lights a little. The garbage disposal dims the house lights a little etc.
If you hit about any electrical circuit with a high current instantaneous draw (bass note) the system's voltage will drop slightly.
SOME degree of headlight dimming is very difficult to cure (although the cap installation under the hood will do it).