Some tough love here, from the parallel universe you. It was people like you in the late 1970s who inspired me to be a programmer (literally, talking to Hughes aircraft programmers on the bus to high school about the JOVIAL language), but one thing I knew by the time I was about 12, say, 1973 or so, was that aerospace engineering in the Hughes aircraft world was boom and bust. I did not learn programming until I was 21(completely self-taught), in the early 1980s, but what I understood from the beginning was that I had to keep my skills up.
Ever since then, even after getting a job as a program manager at Microsoft in the mid-1990s, I have continued until this day to assume that I would be fired and would have to find another job. Which means that I have studied every day for almost 40 years because I knew someday I would get old and less easy to hire. For the last two decades, I ran an extremely lucrative business, yet continue to keep my skills up.
But I haven’t heard from you is that you have tried to adjust to the market. The simple fact is, if you want to get paid what programmers get paid these days, you need to know what programmers know these days. After all, you made a good living in the 1970s because you had a special set of skills for that era. The easiest thing for you to learn at this point would be database backed web development, perhaps in python or (my favorite), Go. You could learn what you need to learn part time in about a year.