OK, I did a little research on the W140, and the brake light switch appears to be about the same (if not identical) as on the W210. See this
thread. This is always the first place to start because they break frequently and they're cheap. In the footwell, up behind the brake pedal.
You also want to verify that you have a good battery with correct voltage and good connections, since low voltage can trigger these gremlins.
Next up in probability would be the wheel speed sensors, but at this point you probably want to get codes read. As a start you can inspect and clean them.