Software engineering was not a career long time ago. The companies have no respect for software engineers and treat them as commodity that can be replaced at any time. The traditional career "progression" also doesn't exist. You can get pay rise only so many times and become the seniorest senior or you want to fulfil the Peter's principle.
While most developers were busy grinding, the corporations did the most ensuring the only sensible pathway to wealth and development is closed = running own business that is. In many countries, due to regulatory capture enacted by corrupt governments, making profit is next to impossible, that if you manage to jump bureaucratic hurdles that are not present for larger corporations.
AI is just a tool. Will AI replace software engineer is like asking will hammer replace the carpenter?