Perhaps a rifle or shotgun could have been used.
Not in this circumstance. In almost all national parks, a firearm must be disassembled while in the park to be legal. I suppose this is a response to poaching problems in the past.
As noted, handguns are not an option here.
I regularly tent camp in the Canadian Rockies, and because of the tight control of garbage, attractants, and tourist idiocy, the wildlife is actually wild. (This does not apply around remote northern work camps outside the parks, though it's getting better.) But in the Rocks, I sleep quite well ... with a hatchet or machete close at hand to drive home the point that I'm not "easy prey" in the event of an extremely unlikely attack. But honestly, my near-death experiences have been on the highways, not in camp.