Consider, we know the first five digits of the gravitational constant. So, while it might seem like the diminishing returns are a long way off. Yet, each extra digit becomes exponentially more expensive and less useful. So, actually learning g out just 9 digits is probably a huge waste of resources.
Or in the words of a physicist, in 1920 second rate physicists where doing first rate research. Now, first rate physicistare doing second rate research.
In number theory, what's considered 'elementary' now was cutting edge in the times of Diophantus, all the way to Fermat, to Euler, to Gauss (etc). The fact that children are now routinely conversant in it, I think, is another point in favor of the importance of making such discoveries in the first place.
My point is that applications that were never envisioned for these (at the time) centuries-old-facts, are now commonplace and indispensable.
I think that there is a bit of survivorship bias that warps our understanding of old science. We remember only the great discoveries because those are the most likely to be republished and read.
Also, in the case of math, it is my impression that an amazing amount of very significant progress is being made in the present era.
As to survivorship bias, that's huge but it's not just based on good ideas. Copernicus was ~4,500 years late to proposing the sun was the center of the solar system. But, the pop story looks better when Darwin is breaking new ground instead of simply collecting more evidence in support of an old theory.
As to Amazing progress, I would hope the ~1,000,000 active mathematicians are not all wasting their time. But again, the point is we don't need to maximizing the number of Mathematicians, we are well into diminishing returns.