Here’s a fine tale of woe:
When I bought the safe, I chose a Sargent & Greenleaf electronic lock because it was much faster to open than a dial lock, and I was in and out of the safe a lot, so I appreciated the convenience. This time, however, I hit the combination, and the numbers beeped when I keyed them, but I didn’t hear the “wearnt-wearnt” of the locking bolt moving. Just a “wearnt” sound, and no movement.
No worries. Probably just needed to change the batteries. Swapped them out with brand-new Duracells, and the keypad beeps sounded fine, but I still heard just a single “wearnt” sound after the combination. And the handle wouldn’t turn. Hmm.
So in comes the Larry The Locksmith, who gives it a going-over, and:
“The lock mechanism is dead. Happens with the electronics. Sometimes they just quit. And we can’t get replacements these days because the boards are sourced out of China.” There weren’t any in the U.S., and there was no prospect of any becoming available for years.
End result?

…plus a locksmith’s bill for drilling and installing a new lock: $1,100.
Not so convenient in the end, was it?
Here’s my problem with all this electronic shit. Occasionally, it acts like a sheep. It just says, “Ah, fuck it,” and dies.
My various safes all have keys, whether ordinary-looking keys (a.k.a. “pin-tumbler lock”) for the cabinets (ammo etc.) or for Ye Olde Gunne Sayffe, cam locks.

Here’s the secret about all this. All safes are inconvenient and time-consuming to get into: that’s just the function and nature of the beast.
But I’ll take fumbling with keys and their operation — cam locks are a royal PITA — over random entombment — via electronic locks — any day of the week.
My real choice would be an old-fashioned combination lock with a fallback key mechanism, but they’re finicky to work — almost as bad as one of the above — not to mention beastly expensive because they are, after all, precision machines. Here’s the ultimate compromise, also from the abovementioned company:

Never forget: if someone really, really wants to get into your safe, they will. What you want to do is make it as time-consuming and difficult as you possibly can.
If you’re consumed by some fear that you might be attacked and have to go for the guns, then don’t lock all of them away. Have at least one gun close to hand — bed, office, workshop, wherever you feel the most vulnerable — and deal with whatever problems this may cause. (Small, inquisitive kids? Teach them about gun safety, and either hide the guns or put them out of reach. Whatever works.)
And finally: don’t trust electronic technology to work faultlessly all the time. Sometimes, old-fashioned mechanical just can’t be beaten.
Team Mechanical here. Combo lock on my gun safe.