There was a thread over at JeepForum about this, but the pictures in it are gone now. :-\
Anyway, I had this problem and solved it by removing the switch assembly, taking it apart, and simply resoldering ("reflowing") all the connections on the PCB board. You can try to clean the dimmer slider with alcohol while you're in there, too.
Basically what happens is that 15 or so years of driving vibrations cause tiny cracks in the solder joints. Pushing on the switch closes the gap temporarily. Reflowing eliminates the cracks!
I've heard of some success using this method with bad BCMs and PCMs, too.
It really wasn't very difficult at all, took maybe 20 minutes once I got it out of the Jeep.