All those professions experienced a massive downturn in staff required, but the jobs remained because the technology wasn't good enough that a potential customer could do the high-end tasks by themselves. We're now getting to the point that they can.
I think we will see a couple very big failures when AIs replace people and then we are back to employing people for many of these roles. I don't see any actual need for AIs in many cases, expert systems could do job better and more accurately. And that has been case for decades.