Someone reasonably trained and experienced with handling a firearm is at minimal risk of having it discharge inadvertently. The more often one handles it properly, the more like one it to handle it safely. Good habits and all. Inadvertent discharge are very rare. Perhaps the most common mistake is ejecting the magazine and forgetting there can be a round in the chamber, but a simple habit of checking that means it becomes very unlikely.
Most folks who carry, I suspect, leave the firearm in a safe with the magazine out. Then many would replace the magazine and put the firearm in a holster without charging it. The risk of an inadvertent discharge then is effectively zero. Some do carry loaded, as ine "one in the chamber", police officers do. This does increase the risk somewhat.
I think most mistaken firearm discharges are mistaken identity. Someone comes in late and a groggy gun owner doesn't realize who it is, but I'm guessing. Then there are hunting accidents which also are pretty rare fortunately. It doesn't take much training to obtain a deer permit, as in any. So, someone may be hunting deer with a high powered rifle and see something moving and not realize it's either a really huge deer or a horse.