Obviously intermittent problems can be hard to trace. Yes, a headlight switch can fail intermittently before final failure. This could also be caused by a failing dimmer switch (had it happen to me last week on my 86 Chrysler Laser). In either case, the internal contacts can become burned. Sometimes they will conduct if they engage just right and sometimes not. Usually when this happens it won't be long before ultimate failure.
When it failed, did you try using the dimmer switch to try both high and low beams? If only either high or low beam works, the likely cause will be the dimmer switch since the headlight switch sends power to the dimmer switch for both. If neither high or low beams work it still could be either headlight or dimmer switch.
You could wait for total failure or keep "playing" with it to get it to fail at which time, using your manual schematic/wiring diagram, you can trouble shoot between the two potential causes.
Since a headlight switch is only about $22 (I bought one for my truck at Carquest two weeks ago), and assuming I couldn't get it to fail again right away, I'd be tempted to go ahead and replace it and hope for the best. I think a dimmer switch, which is a "multifunctional switch", costs about $160(?).
There are other possible causes, such as an intermittant short in the wiring, but the most probable are either of those two switches in my opinion.
I hope this helps. Good Luck!
