The 9mm Luger has come in and out of vogue over the years too. The 40 S&W is a wonderful cartridge and like any other you have to find a gun that you like shooting chambered in it. So much of the popularity of one cartridge over another depends upon the platform it is available in.
Right now a good selection of both guns and ammo are available in it and you might want to take advantage of that. If the 9mm and 45acp are so perfect there never would have been a reason for 40 S&W development in the first place.