Try locating the grounds from headlamps themselves, to nearby sheetmetal. remove, sandpaper shiny mating surfaces and screw threads, and retighten.
Also follow all wires from battery (-) terminal, to firewall and give them the same treatment. If these smaller wires have any white corrosion at the battery terminal, consider them toast. If there is no ground wire from engine block to nearby frame, add one.
Look for wires to headlamp switch or dimmer switch that have burnt or somewhat melted looking insulation. close to the connector.
Need strong light and perhaps some magnification and might need to clean the wire insulation to see properly. wd-40 on a rag works best..
Throwing a new switch at a bad connector is not going to fix the issue, for long.
Fixing a bad contact inside a multi wire connector takes 'some' skills. Often the housing is melted near the bad connection and reusing it with a new contact is not really feasible or desirable.
If your headlamps are not bright enough for you, this can be the time to use the original wiring to trigger relays, which is another way of saying shorter fatter wiring delivering more pressure to the headlmaps and thus make them brighter.
A headlamp bulb getting 14.4v is 50% brighter than one getting only 12.6v, and often there is 3+ volts of drop along the old undersized circuit. I was having over 3.5 volts of loss on my '89 dodge. now, post harness upgrade, the bulbs get within 0.3v of battery voltage. Much much brighter.
Also upgrading the harness with relays, the current for the headlamps no longer flows through the headlamp or dimmer switches. Only the current required to hold the electromagnet closed does, and this is about 1/10th the headlamp current.