Agreed on the dog approach. Noise is a big deterent to a casual break and enter.
I'd also go shotgun over a handgun for household protection. If by some chance you miss the perp with that handgun, where is that bullet going stop? Your house walls, your neighbors house walls, or maybe something inside their place that finally stops it? Hope it isn't your neighbor or someone important to them that provides that backstop. Like horsepower, penetrating power is sexy, but what are the practical limits of it in home defense?
Shotguns have a visual tactical advantage in a one-on-one situation... nothing like a 12 gauge mouth, preferably in stainless, twinkling in the moonlight! The problem is even the smaller "riot guns" are still large and clumsy, have a blinding flash in a low light situation and are not synomymous with rapid accurate follow up shots, if necessary. One should never attempt to 'clear' their own house, but there are some us who would try. I trained police in house/building clearing for 12 years. "I" wouldn't attempt to clear my own house, and furniture is placed to prevent anyone from 'hiding'. I know how the responding officers are trained, I probably trained their trainers. And a shotgun is the LAST gun you'd try to clear a house with. Always best to snap off the safety, dial 911 from your 'safe place' and wait for the good guys to show up and find you. Of course if the bad guys find you first, and your phone is of course still connected to the local constabulary, you needn't issue a warning before engaging.... but you'll get style points if you do. And your lawyer will love you for it!
Over penetration is always an issue with a missed shot. So, practice and don't take the shot if you can't make the shot. Only competitive shooting will show you your limits. You can punch holes in paper all day on the range, until you're "under pressure" you have no idea how well you will or won't shoot if you're Condition Black. I have a winter and summer choice of ammo for my main carry gun. I even have preferences for evening attire preferring a low flash load. Bad guys are wearing leather or down in the winter, you have to be able to punch through that and have an impact. Paradoxically in the summer the bad guys are in tshirts or light jackets, no need for as much energy and a greater chance of over penetration. Every gun is different, internal pressure will differ through a host of guns in the same caliber, research your own weapon thoroughly before choosing the appropriate anti-personal ammunition. And take that gun to competitions, regularly.