I've spent over 1,000 nights at anchor and never had a problem.
Not in Haiti!!!
We cruise for pleasure so if there's an area where we don't feel safe, we just don't go there.
There's a chance of an issue anywhere including in your own home but I would hate to go through life feeling I needed a loaded gun by my side 24/7.
Besides, if you are asleep and half drunk and the intruders are awake, armed, and expecting an encounter, how do you think it's going to turn out?