Glocks, like other firearms, are as safe as the people using them.
The G26 is my favorite Glock. I've owned 2 of them over the years. My second favorite is the G27. I still own the G26 I bought in '04 (after adding Glock to my list of armorer classes back than), as well as the LNIB G27 I bought from Glock (Rep Demo gun for a magazine article back then).
Glock has three mechanical safeties designed into them.
Safe Action System
It's important to use a good quality holster that protects the trigger, and to make sure that nothing enters the holster that might become entangled with the trigger and cause the trigger to move and fire the gun. This means normal inspection of whatever holster is chosen, to make sure it remains in good, normal operating condition.
An aging, worn leather holster that permits the trigger (and it's integral safety lever) to be moved may result in a ND. Case in point ...
Worn Leather Holsters SAFETY WARNING: Accidental Discharges
Also, if a bit of clothing - drawstring, end of shirt or coat tail, etc - enters the mouth of the holster when the gun is being holstered, and becomes entangled with the trigger, if could cause the trigger to be pressed.
Now, the Glock uses a grip angle of approx 23 degrees, which is different than that of many revolvers, as well as many pistols which use a more traditional 18 degree grip angle, so the shooter must acclimate to the change in grip angle (using the sights is a good way to learn how any particular shooter's grip/wrist technique may have to be adjusted

).
Make sure to read (or download and read) the owner safety manual to become familiar with safe field-stripping and reassembly. Since Glock requires
pulling the trigger on an empty chamber to field-strip the gun, it requires attention to proper safety practices.
If I were only going to own ONE Glock, it would be the G26. If I ere going to only own TWO of them, the second would be a G27. Which is what I presently own.
Using good quality, factory ammunition, such as that made by the big name makers in America, are a good way to help maintain optimal feeding and functioning (like with other pistols

).
BTW, like the OP, I mostly carry a pocket-holstered J-frame in my retirement. (Like I was doing the last several years of my career, comes to that.

) However, I have been carrying an older 3" M36 in an old leather paddle, and sometimes one of my J's in a vintage (new/old stock) crossdraw holster I found a year or so ago, since it reminds me of my early days as a cop. (It was made by a local leather maker who specialized in leather police gear when I was a young cop, so there's some nostalgia involved.)