IMHO, be of a mindset that you're willing to specialize virtually anywhere, with the awareness that specialization can itself be a double-edged sword. AI if used correctly can help you learn faster and be more productive.
Right now humans are the glue for AI. That's probably not changing any time soon; software as a whole was a mess prior and it's even messier now. If it does change and the industry ends up wholesale unemployed, then you can probably expect most white collar jobs to follow suit, with everything shortly thereafter once general purpose robotics are fully online.
I don't think that's happening any time soon, and if it does society as a whole may have a huge problem on its hands (or everyone's quality of life gets better, who knows).