For each programmer who actually spends their time on complex design work or fixing difficult bugs, there are many more doing what amounts to clerical work. Adding a new form here, fiddling with a layout there. It is the latter class who are in real danger.
If your job is massaging data for nebulous purposes using nebulous means and getting nebulous results, that you need to basically be another person doing the exact same thing to understand the value of, there's going to be a whole lot of management saying "Do we really need all those guys over there doing that? Can't we just have like one guy and a bunch of new AI magic?"