For home defense, it is possible to keep a gun in a safe space that is both toddler-proof AND accessible when necessary. I'm talking about bedside electronic safes, commonly available with combination [0] or biometric [1] locks, always with a physical key fallback. These solutions reduce unnecessary coupling between access control technology and the gun itself. At the very least, this means the (well-maintained) gun will 100% go "bang" when you pull the trigger.
[0] https://lowes.com/pd/Barska-Compact-0-36-cu-ft-Electronic-Ch... [1] https://www.walmart.com/c/kp/biometric-gun-safes