If a gun is ready to defend your life, it's ready to fire.
One that's not ready to fire, isn't ready to defend anything.
All of the LEO unintentional discharges were negligent. They all have one thing in common: the trigger was pressed by a negligent operator. Remove the negligent human in the loop, and the gun is perfectly safe.
Of the several Glocks I own, not a single one has ever fired when I didn't want it to. I don't worry about them "going off" because they're ready.
I do however, worry about a gun that appears to be ready, and then doesn't go off when it's needed. That's like a life preserver that doesn't float, or a parachute that doesn't open. Not good.
Back on topic.
OP - While a shotgun can be a fine defensive weapon, it's big, hard to maneuver in tight spaces, has a fair amount of recoil, and is expensive to feed, even in normal times. It's not really a great first gun.
Honestly, I like the .357 Magnum revolver as a first gun. It's relatively cheap to feed with .38 Sp ammo, and the recoil is modest. With .357 JHP, it's got great performance. It is also simple to use.
Short of that, a Glock in 9mm, like the Glock 19, is a great first gun. Some folks love Glocks, for example, and some hate them. Their grip angle is a bit different. Their trigger is a bit different. Neither are bad per se, but they put off some folks who grew up shooting a gun with a different feel.
I've taught a 12 year old girl to shoot with a Glock 19, and it was her very first time shooting. She was able to handle the recoil, and she managed the slide manipulation, and loading, just fine. She received some excellent simulator (simulated fire, virtual environment) instruction with a Navy Small Arms Instructor using the Beretta M9 prior to shooting the Glock, and that brings me to the last point.
Get training. Get a one on one training session with an experienced instructor. Learn the fundamentals of shooting. Learn how to manipulate and load your weapon. How to clear it. How to clean it.
As part of that training, if you're able to try out a few guns, rent a a few different types, then that will greatly inform your decision.