Both the Glock and the S&W M&P are fine examples of the plastic-framed service pistol concept.
As an owner, user and armorer for both model lines I have some experience, as well as some personal opinions, when it comes to advantages and disadvantages of both model lines.
First of all, if you've been shooting a Gen3 or earlier G22 without the recommended cleaning, lubrication and maintenance for "thousands of rounds", you're not caring for the gun as is recommended in the armorer classes.
You might consider that the .40 S&W is generally considered to be harder on guns than the 9/.45 cartridges.
One armorer instructor in one of my Glock recert armorer classes described routine maintenance considerations in an interesting way one time.
He told us that if we're seeing broken locking blocks, locking block pins & trigger pins ... we're not replacing the recoil spring assemblies often enough. The recommended replacement interval for Gen3 & older G22's? It can vary a bit, depending on who you ask at the company, but it's typically considered to be around 2,500 - 3,000 rounds.
There was a replacement schedule for "wearable parts" that Glock gave to armorers, back around '08, and it listed some parts that they recommended be replaced in the .40's being used by their LE/Gov customers at 5,000 round intervals. They included the firing pin spring, safety plunger & spring, slide lock, trigger spring & locking block pin.
The recoil springs for the G22/22RTF's were recommended for replacement at 2500 rounds, or sooner, if needed. It was recommended they were checked at each range session.
Since then, I've been told by the company that the latest trigger spring (coil, light gray finish) has been determined to be a lifetime part ... (unless they eventually decide otherwise, of course

).
I've seen some worn out recoil springs and really worn/peened locking block pins. I haven't seen any broken trigger pins or locking blocks, myself, but I've spoken to other armorers who have come across them. I spoke with one agency armorer who had some barrel lugs breaking off in their G23's, but he said they been in-service with their original recoil springs for 10 years.
If you'd like to experience optimal functioning & service life from your pistol, it would be prudent to maintain it accordingly ... not abuse it.
The M&P offers a more robust slide in the way of a thicker/longer guide ring, as well as the rails having more metal below them (you'd have to stand around the cleaning station at a LE range and see slides dropped onto hard surfaces to really appreciate this feature

).
The steel straps molded into the frames (a sub-chassis) receives the steel coil pins at the front and rear (locking block & sear housing), which helps create a rectangular steel "box" in the M&P frame. This reportedly helps mitigate recoil forces acting on the plastic frame. Very nice idea.
The sear housing being a steel part is a nice touch, too.
Having the robust "rocker rails" incorporated into the steel locking block and sear housing assemblies makes it a simple matter to replace any damaged rails. The rail design used is considered self-centering as wear occurs, with the idea that it contributes to inherent accuracy even as the gun experiences wear. (Yes, I've spoken to another Glock armorer who had a brand new F-series issued G22 start exhibiting erratic functioning issues on a qaul range when the L/R frame rail snapped off.)
The striker assembly uses the same sort of striker return spring inside the striker assembly as is found in the excellent Walther P99 series, and serves the same purpose (helping prevent excessive contact between the striker & safety plunger, mitigating excessive peening).
Being able to field-strip the guns without having to pull the trigger is a design feature which can aid in helping prevent unintentional discharges by owners/users. Like it or not, this sort of thing may be appreciated by agencies who have a large group of users who may not necessarily be considered "gun enthusiasts".

(Hey, I remember when the Ruger P-series incorporated the pivoting ejector plate that you had to reach into the ejection port and push forward in order to field strip the gun. It's not like it's a necessarily old idea.)
The visual load chamber inspection port is handy.
The captured stainless steel recoil spring assembly is something Glock owners have long desired.
The grip inserts adjust both for grip reach, as well as grip girth (thickness), and the grip angle is something a lot of users of the other major pistols might find similar.
The M&P comes with a lifetime (to original owner) warranty that
includes free shipping.
I like both designs.
I just think the M&P incorporates some nice refinements and takes the concept of the plastic pistol a little further.
Suit yourself. I do.
I like and use good equipment that suits my needs and is made by reputable manufacturers. The Glock and M&P pistols meet those needs, but they do differ in some interesting ways.
I suspect we'll continue to see both designs continuing to do well in the field, too.
