I used to instruct/attend Appleseed rifle shooting courses. When they made the switch away from expensive and loud .30 caliber battle rifles to .22’s, they found a formula that helped reduce .22 malfunctions in semi-autos:
Keep the gun clean and lubricated.
Use quality .22 ammo that has a 40 grain bullet pushed at 1200+ FPS. This provides more cycling power than standard velocities, especially with lighter bullets.
I have found this to be true with my semi-auto pistols (including a M&P .22 full size) and rifles. I buy bulk boxes of Federal Auto Match (40 grn 1200 fps). There is higher quality, more accurate ammo out there, but not for a better price, about $0.05/rnd now. Fairly clean shooting too.
I have used a few other brands with the 40/1200 characteristics and they have worked fine too but some shoot dirtier.
I want my gun to function first, then be accurate. CCI magnums work great but are expensive.