With the renewed interest of Law Enforcement in the 9mm, .40 popularity will surely come down but will not go extinct. Just see how the .38 special has survived and thrived after the .38 spl revolver lost favor with LEO and their agencies.
I'm glad many shooters have been influenced by the same, and have been dumping their 40s on the EE. Got my FNS 40L x 2 at great prices. Waiting for the same to happen to Glock 22s.
IMO, the .40 is destined to become one of the great pistol calibers.
In the Canadian situation where maximum pistol capacity is 10 rds, .40 is my favorite. Its got serious power and accuracy. My most accurate pistols are the Ruger P91 and FNH FNS40L, both easily capable of 2-inch 5 shot groups at 15 meters, standing off hand, shooting my own reloads and home cast bullets.
I also have the 9mm versions of my .40 pistols, just because they are easier on the hands, to practice with. I cast and reload, so ammo cost is not a concern. I do notice much less .40 brass at our range, but that's fine. That's enough for me.