I am by no means any kind of expert - real or imagined. But since you asked for opinions, I thought I'd offer mine. They are free, just keep in mind that you often get what you pay for...here goes:
For home defense, I've cycled from pistol, to rifle and have finally settled on a shotgun. My decision was based on a couple of criteria; namely minimizing over-penetration and secondly, amount of "punch" per round. I personally run a 12ga. I can't comment on the viability of a 20ga. in a home defense situation. By that I mean I wouldn't want to get shot with one at the end of a hallway. I don't know what kinds of 20ga. ammunition are available that would be appropriate/effective. The 12ga. let's me load 8 or 9 pellets of 00 buck (.32 cal. each pellet) that exits the muzzle anywhere from 1300-1600 fps. That is a substantial payload IMHO. If you are recoil-sensitive or have a torn up shoulder, the 20ga. might make sense - provided suitable ammo is available. If someone kicks your door in at 2 in the morning and a gunfight follows, you likely will have poop in your shorts and a heart rate of 250. I've never been in a gunfight, but Id wager that recoil isn't your biggest problem at this point. A more important concern would be remembering to reload the gun. I cant think of a scenario where gauge and amount of recoil would be affected by the size of the space you're in. The overall size of the gun, primarily the length of the barrel would matter in this regard.
I think that you'll find that most home defense oriented shotguns have barrel lengths about 18". As far as stocks, I've never run a collapsible stock on a shotgun and don't plan to anytime in the future. That seems like a likely failure point that I don't want to have to think about when the door gets kicked in. I would also not advise using a full-length stock. My normal length of pull is 13". I have a Magpul stock on the shotgun next to my bed and the first thing I did was remove two of the spacers. This made the LOP about 12". I was amazed at what a difference that one inch made both in maneuverability but also in shootability.
As for brands, that gets pretty subjective. The Remington 870 has been around a looong time. The military runs Mossberg's and Benelli's. A Beretta 1301 sits beside my bed and I'm comfortable betting my life on it.
As with any defensive firearm, training is absolutely paramount. Practice shooting the gun using a push-pull technique really helps mitigate the recoil. Learn to keep the gun loaded because they don't hold very many rounds. Learn to maneuver your chosen gun inside your house. There is a technique called "short-stocking" that really helps in the maneuverability department. It involves turning the gun 90 degrees and getting the stock on top of your shoulder. You'll really need to get used to shooting from this position if you plan on using it...ask me how I know.
Lastly, I think that any shotgun you want to use for home defense needs a couple of things. #1, it has to have a source of ammo because you'll likely be fighting with only what's in and on the gun. #2, it's got to have some kind of light on it. It's dark as heck at 2am. #3, mount a red dot sight on it if you can. I've got one on mine and I love it!
Long winded, but I think I opined on all of your questions. Good luck!