It's all about how well you can control what's in the shell. If you can control a 20 gauge better than a 12 gauge then by all means! Use the 20 gauge! A 20 gauge that hits will put down an attacker better than a 12 gauge that misses.
A 20 will do so will a 410 but I believe BIGGER IS BETTER. It's the American way! Slug, Buck, Bird which is better? I say #7 1/2 bird low brass is just fine for home defense. Your only shooting a few yards in a house, the spread is about 10" at 5-6 yards, and at that distance it tends to shred what it hits. The bad guy won't be robbing anyone else.