“Given an even choice, I would have to say handgun (assuming it was something in a significant caliber, i.e. beginning with 4), because handling a shotgun in cramped conditions can be a bit dicey.”
http://www.keltecweapons.com/news/preview-kel-tec-shotgun-ksg/
Methinks the above device would fulfill your “close-in” shotgun requirements. Use low powder charge/No. 1 buckshot shells for low recoil with 12G shells. It’s a pump, so no worries about the low powder charge not cycling, as with a semi-auto. TWELVE-SHOT capacity!
I am not a big Kel-Tec fan, because I have one of their little .380 pistols and it's a piece of . . . junk. Kicks like a Missouri mule, too.
I'll let somebody else buy it first & try it out.