The chances of being the victim of such a robbery are so incredibly small that I don't feel the need to specifically prepare for it. When this situation actually plays out it is highly publicized. I think that causes some of us to overestimate the probability of this happening.
I could get stuck by lighting, but I don't wear a lighting rod hat, and I could get hit by an asteroid, but I'm not going to go about preparing for that kind of situation either.
In the situation of somebody banging on my door in the wee hours of the morning I would look out of my peephole in the door and confirm that it isn't one of my neighbors with a dire emergency. After I saw that it looked like cops I would go to my room, shut and lock the door, call 911 and confirm weather it is the cops or not. If it was the cops I would cooperate with them even if I knew they had the wrong address rather than risk getting shot.