How can I let 2 devices take turns accessing a SIM card?
There is no technical reason you can't implement this. The sim card is a basic eeprom like device. Placing each of the data and reset lines on a mux and sharing the ground on the devices would be enough. You may also need to set the card insert detection pin on a mux as well.
The problem is when you dont have control of the two devices. If you can't control how the device reacts to random disconnections of the card between or during a write/read, or how it reacts to delayed communication, then it is not a feasible system.
Man in the middle sim card devices exist which do exactly what you want to do, like sim cloners and phone unlockers. The concept is simple but the implementation is where the hard part lies.