A few years ago a NYPD responding to a domestic got shot almost poiunt blank range in the face with a .357; not only she survived, but went back to work.
I like 9mm because it is widely available, reasonably cheap for practice and not too big.
The .45 is also readily available but a 17 shot mag is not common, and I'll take the number of rounds over the energy, especially facing multiple threats.
The difference between a 9mm and a .40 is negligible; a G-26 with a G-19 barrel has better ballistics than a G-27.
So don't spend more energy sweating it, as all said shot placement is the thing, practice, practice and practice; even practice with some body behind you holding you by the shoulder and shaking you ...