I mean, you could swap the cards live, but I'd be worried about the electrical end, not the debounced and processed signals coming from the OS - although if I were writing a malicious package, device tree changes would also trigger all sorts of alarms. (Had a bad contact on an SD card once - the effect of disconnect-reconnect on the running OS was...spectacular, but in a bad way. In the better case, it fluctuated the board voltage enough to reboot.)