.40 cal was an extremely popular option during the 10 years of AWB silliness where everyone was limited to 10-round capacity magazines. 10 rounds of .40, if you can handle the recoil and muzzle flip is more effective than 10 rounds of 9mm.
Since the sunset of the AWB and the fact that every .40cal pistol holds less ammo than the same size/model of 9mm pistol, it's popularity has dropped. And since so many LE organizations have moved to or back to 9mm, the popularity of .40 has REALLY dropped.
However... it's all relative. .40's popularity has dropped like an absolute rock, perhaps more like a boulder off a cliff. But it's rise was meteoric and it's popularity at one time was gargantuan, so it had a long way to fall. It would be accurate to say that today, right now might be the least popular that .40 S&W has ever been since it's introduction. But even though that might be true, it's probably still a current top-5 in center fire handgun-specific ammo.
Also, you can measure popularity in a couple different ways. Measure by ammo sales or look at current guns being produced or watch as new handguns are being debuted to see if a particular caliber is offered. Any way you slice is, the popularity of .40cal is at it's lowest now and diminishing, but it's still near the top.