First, I own the Glock 17, 22, and 21.
Look at the dimensions of the glock 17 and 22. Notice how the external dimensions are very similar. Now, ask yourself what is different on the inside if one shoots a .355" bullet and other a .40" bullet. Internals got thinner going from the 17 to the 22.
I carry the Glock 22 on duty because I have to. My shot recovery time on both 9mm and 45 is much faster. Also, the recoil on both the 9mm and 45 is much friendler in my humble opinion.
Also, my frame, barrel, slide, rails will not be failing after a bunch of rounds with 9mm or 45. I cannot say the same necessarily for the glock 22.
Unless you have 1,000,000 rounds of .40 S&W stockpiled to shoot, I would URGE you to either go with the classic glock 17 or the glock 21. Your handsize may prevent you from comfortably shooting and operating the controls on the Glock 21.
Certainly shoot before you buy in either case.