Is it really the case that dev career is over by the age of 40?
There are >40 devs, there's less of them because 20 years ago there were generally less devs, so you wouldn't expect to be the same amount of 50>40 devs as for example 35>25 devs. The sole fact that there's less of them (I think we can agree that there are >40 devs) doesn't have to mean that they just stopped working as devs - there are other reasons, right?