Digital built-in microphones use DMIC, which aiui is a one-wire interface where the microphone just sends a delta-sigma bitstream. If you implement the switch through a multiplexer or logic gate this kills the signal 100 % essentially.
Analog electrets can't be just shorted, because that causes a loud BANG when you switch due to the bias voltage, so you use a capacitor in series, which only shorts the AC portion. Because of the impedances involved, this only gives you 40-60 dB of attenuation, which isn't enough for a good ADC.
Similar for XLR microphones (hot+cold are shorted, not disconnected, because of phantom power).
Anyway the thing is connected to an ADC. The computer can sense when the switch is turned on/off, and turn off (or flush) the audio pipeline at the appropriate times.
Ramping the bias voltage requires additional components (cheapest way these days would probably be a separate DAC integrated into the audio codec, but then you are back to not having a physical kill switch) and also incurs extra delay for turning off and on (probably 100-200 ms).
a) the switches are trivially repairable (like switching out RAM on my Lenovo, which requires exactly two Philips screws), or
b) designing the switches such that their mean time to failure is far longer than the mean time to failure of any of the other critical components, which is absolutely do-able using the right materials and tolerances.
It's not as though audio on a laptop is pumping enormous amounts of current that presents a serious electrical challenge in that respect, and it's unlikely that the mechanism is going to be used 1000 times per day for 10 years.
Edited for formatting