Is the .40 dead? no, its just less popular than it has ever been but it will not go extinct.

It still has the same advantages over other service pistol calibers that it had when it was introduced:

More energy delivered to the target in standard loads over the 9 or .45
Better intermediate barrier penetration than either (which is why it is still in favor with law enforcement).
Fits in 9mm platform sized pistols and magazines.
Much higher capacity than a .45 pistol of equal size.
Less cost to shoot than the .45.