"They also needed a strong aptitude for mathematics, which is where the false myth ". I must disagree here. It may depend how we understood what is math, but the truth is, while one can start learning "coding" without any "love for math", experienced and efficient programmers are actually not very different from mathematicians, the only difference being they rediscovered math instead of leveraging what is already there (and I don't mean school mathematics).
See my article on it: https://roman-suzi.medium.com/good-software-developer-uses-math-9954b46e50a1
And the decline happens exactly for the reason, that there are a lot of "first level" coders, who never grow to the meta-levels. If coding were painting airplanes, one remains painter throughout career, and never becomes paint robot builder or at least operator...