I'm no gun expert by any means.
It doesn't matter which one you choose. I'd choose one that felt good in your hands and the one you like better.. Personally I'll never own enough guns. And I would never buy a new gun used. When I buy a gun new I plan to keep it forever.
Good luck on your decision.
Btw I love my S&W M&P 40.
Well it looks almost new, just a little wear on the common points and the usually retail for 850 around here new with 2 mags. I like the feel of the M&P but here in MA we are stuck with a crappy MA compliant trigger that would cost $135 to get replaced, on top of the $535 price tag just to have the same gun everyone else in the country can get, and thats a bit out of what I can justify spending.
If your looking to carry a concealed, I use a 22 cal. for two reasons one its very easy to conceal, I can hit what ever I need to multi times due to low kick back, very little re-aiming, and very acurate, and yes a 22 will stop a person, in the time you can get a second aimed shot off with the 9 mm I have unload a clip, but thats just my opinion, some just need that big gun, also a 22 will draw out of a shoulder holster faster
From the ammo tests and reviews I have seen, 22 just isn't as effective from a hand gun as a larger caliber say 9mm+ it may work, but I wouldn't bet my life on it. Plus 22lr is impossible to find right now, every shop ive been to has had an empty shelf where they keep the 22
Really most any modern gun commercially available in the states is going to be plenty reliable out of the box, after that it's up to your cleaning schedule. It'll need cleaned regularly even if you don't shoot it, mine gets full of lint and crap pretty regularly.
The biggest part of choosing a gun: Finding one that's comfortable in your hands.
The next thing is how it shoots, it may very well be worth it to check out a gun range and ask if they have some models to try shooting, usually they'll oblige and help you out.
Obviously smaller is better for concealed but the holster has a lot to do with it as well. I use a White Hat, but there's a lot of others that are very similar in design. Mine conceals my .45 full size M&P (10+1) on me pretty well, and I'm not even that big of a guy. Though I'd have rather gotten the compact version looking back.
Ask your friends that have pistols and guns as well, they could give you a line or let you try theirs.
Both are very comfortable in my hands , and sized nearly identically, I'm sure I could conceal either with out any problems. I've been looking at the White Hat and CrossBreed holsters and like them, most of the stores around here stock the CrossBreed's and the White Hat's are backordered.
Unfortunately there aren't any ranges around here that rent guns, they are all members only, but a few of my friends are members of one and I'm going with one of them sometime this week to shoot his 40 M&P again. If I can handle that ok I think I'll go for the p229, if not then I'll get the sp2022.
But I'm still thinking the lighter 9mm may kick just as much as the heaver .40