Problem Solved:
My 98 Explorer had the same problem, all brake lights were intermittent. This forum really helped me, but in my case the problem was not necessarily the (stop light switch) on the brake pedal, but it was the electrical contact pins male and female in the plug and switch socket. It turned out that there was some type of insulating coating on two of the pins and some in the socket's pins. The fix was to use a narrow diameter pipe cleaner and Q-tips with some contact cleaner on them, (brake cleaner or alcohol might have worked ok also.) The pipe cleaner fit inside the female pins and the Q-tips for the male pins. Let dry before re-assembly. This worked great but I also noticed that the male plug on the wiring harness fit pretty loosely into the (stop light switch's) socket, so I put to small dabs of silicone on the outside of the socket & plug to help hold it steady. Tested it again today many times and no failures. Side note: If I had opted to replace the stop light switch, there is a good chance that it too would have failed intermittently if there was still something dirtying up the pins on the wiring harness's plug.
I hope this help someone.
Monday, May 10th, 2021 AT 1:44 PM