Me again… I will now retract my correction in my previous post.
Having decided that my faulty parking brake switch is not much use for anything, I decided to disassemble it to see what makes it work.

It really is just a couple of pairs of contacts and a lamp, in essence. Although, of course it has been designed to be a bit more than that. But there is no mysterious technology or software logic involved.

The 'switch' part is actually two separate surface-mounted pushbuttons on a small circuit board. They are wired separately to four of the pins on the connector, which goes part way to explaining why there are so many pins on the connector. They must do two separate functions or provide open/close signals to two different units, maybe to the park brake controller and the ABS controller, for example.

The other four pins on the connector are for the lamp. There is a ribbon cable going to a second small circuit board which has a transistor and three resistors on one side and three surface-mount LEDs on the other. So no magic there.

This then begs the question of what goes wrong with these hundred-dollar pushbutton parts. It could be one or other of the pushbuttons. Maybe one works and the other goes faulty which then confuses one or other of the controllers that they are connected to.

Or, my other theory is that it could be the connector pins themselves. These pins are just push-fitted into plated-through holes in the circuit board they are connected to. There is no additional solder on the joint. After a bit of vibration and a few years of oxidation, the connection between one or more of these pins and the holes they are pressed into could become somewhat intermittent. I reckon that for a hundred dollars they could have included eight small daubs of solder to prevent something like this happening.

So if my new switch goes faulty sometime down the track, I'll look back at this thread and remind myself to disassemble the back part of the switch and try to get small dots of solder onto where the pins push into the circuit board using a fine-tip soldering iron (if my eyesight is still in reasonable shape by then).

Hope this helps someone.