As far as .22lr and .25, that's kind of a ridiculous analogy, unless you are saying the performance gap between .22lr/.25acp and 9mm is the same as between 9mm and .40.
I'm saying if the speed of delivering a second shot was more important than the effectiveness of the first shot then follow up shots would be decisive and the fastest follow ups would be with .22lr or .25ACP. Carry enough gun. I like the .40S&W in sub-compacts ( <4" barrel) because the velocity loss of .45ACP in the short barrel risks inadequate penetration especially if you do get expansion.
If I carried a 9mm I'd carry 147gr ammo, when I don't feel I need to carry a gun I carry a little .380
(which is less pleasant to shoot than my .40 Shield)
Worrying about recoil is fine for the range, but if the bullets are flying both ways odds are all your fine motor skills go out the window and you'll end up "instinctively" point shooting focusing on the threat whether you practice doing it or not. I pretty much only do "point shooting" at 3-7 yards with my little .380 pistols.
Lots of clichés apply to various degrees:
"Speed is fine, accuracy is final" -- absolutely, the three most important factors in handgun effectiveness are bullet placement, placement, and penetration!
"You can't miss fast enough to win" -- true enough, but its trivially easy to be slow enough to lose!
"Any hit is a good hit" -- few things will mess up your opponent's aim as much as a bullet impact, but "instinctive point shooting" at close range often means both sides take hits, and often a non-torso hit goes unnoticed until afterwards when amped up on adrenaline. Read the story: "Gang Leader versus Pistol Master: The Wayne Johnson incident" by Massad Ayoob in American Handgunner.
My position is to carry the biggest gun you can adequately conceal, but rule #1 is have a gun! Practice with something as similar in operation as possible that doesn't break the bank or beat you up. Its impossible to have too much practice. Its even better if you can practice draws from concealment, and shooting from behind or around cover. Although many public ranges will make this impossible to do with live fire, a "realistic" AirSoft replica can be a big help here in the privacy of your own home and you can practice with what cover might be available to you in a "home invasion" scenario. I tell my wife that if the alarm goes off, grab the gun and hunker down in the bathtub or behind the toilet (depends on which bathroom is closest) and be ready to shoot when they come through the door!
It may be financially difficult to buy both initially, but if you practice as much as you should, a 9mm version of your .40 or .45 carry gun will pay for itself with savings in practice ammo costs, and as I said save wear and tear on your carry gun. I like to shoot my carry gun and its expensive JHP ammo periodically after actually carrying it at increasingly infrequent intervals after I've broken it in and no less than once a year after its passed all the shorter interval tests.