As I see it, new calibers and guns come out in "good gun times" when ammo is relatively affordable, plentiful and easy to procure. Even if a specific caliber will not do anything all that much better than a long time established one, as long as there isn't a hassle getting ammo to feed it, it could hang on. Manufacturers and ammo company's are always looking to market a "better mouse trap" and it is just easier to do it in "good times".
The S&W 40 (as I see it) was probably the best "new comer" to the firearms world over the last 3 decades and one of the very few that was /is a really great round. The 10mm suffered from a bunch of "flaws" such as recoil, muzzle flash, ammo cost & availability and of course not a whole lot of shooters could shoot well, accurate and consistently with it. The efficiency of the 10mm was very high, however in order for it to be effective it must hit said target which it did not do many times! So.... yes the 40 S&W was over all a much better practical round - hence the reason it is still somewhat popular.
In "bad"gun times such as we are now in because of Government gun control agendas, ammo laws and restrictions being introduced every day, sky high prices, etc. gun owners are trying to stick to the smallest amount of caliber variations and pistol configurations and unless the specific "new" caliber is just so so much better, they opt to stick with what they have, what is easily available and of course affordable.
The tried and true century old 9mm is just hard to beat!! It is low cost, readily available, easy to shoot for almost anyone, the guns are all over the world in pretty much any size, shape and configuration and the new crop of 9mm rounds like the Federal HST, Speer GD, etc. are excellent!!
Bottom line here is, yes the 40 is still hanging on, but it is my opinion that most of the guns chambered in 40 are already out here and owned by veteran gun guys. The 10mm is slowly falling by the wayside for many reasons and ammo is not only hard t find it is very expensive when you you find it. Many police agency's and Federal agency's have switched back to the 9mm and now that the prices have skyrocketed I think new calibers will be very slow to come out now. The 9mm will be the King of the Hill for the foreseeable future IMO. So that is my take.