I’ve boarded trains and bought items in Japan with a “completely dead” iPhone using the power reserve feature where Express Transit cards remain available. It actually works really well, and means I don’t have much fear using my phone for those things in Japan.
Granted, ID cards aren’t like this, but there’s no reason why a system couldn’t be added for them.