The biggest advantage that the larger calibers give... is more reliable penetration.
The 22 can penetrate enough when the right round is used. From the tests I have seen online, the CCI velocitor is the one to get for a handgun. It penetrates the most, at 15 inches. (from a 3.5 inch barrel)
The problem is bone and other harder to penetrate parts of the body. The 22 is less able to punch through those areas and still penetrate adequately, than a larger caliber like 9mm is.
If you shoot an attacker, hit their sternum and it prevents the rounds from penetrating enough to hit the heart, or alters its course enough to miss, well then its not doing its job. But this is where the low recoil and several follow up shots can help.
So it can work well, but as I said, the larger calibers do offer distinct advantages... so long as the shooter can shoot the pistol well.