The S&W M&P was designed for 40 S&W so you got the right gun for the caliber.
As far as one handgun caliber being better than another, none of them are that great, it is up to the person driving the gun to put the shots where they need to be in order to stop a threat. I would recommend a good defensive pistol class to teach you these skills.
For wear, I would say that the 40 does put more stress on a pistol than 9mm but the life of the pistol is at least 50K rounds and S&W offers a lifetime guarantee. By the time you put 50K rounds through a pistol, you have spent far more on ammo than the initial cost of the pistol.