I often think the only type of collapse we can expect is if we can develop a generalized AI capable of writing code. If we do that, no profession is safe -- what need is there for doctors if we have AI that can identify disease and treat symptoms with better accuracy. The point at which software developers get automated away is the point at which all white collar careers disappear.
Not sure about your analogy. Doctors do many things apart from ‘identify disease and treat symptoms’. More importantly, doctors like to do the other things they do eg counselling patients, bedside manner, shared decision making, working in a multidisciplinary team, patient advocacy, policy developmemt. Many coders love to just write code, they wish they could just write code in fact, without the other stuff a job inevitably entails. That’s why AI replacement is a risk - the job will change into something different (probably with the word ‘evangelist’ in the title) which is probably not as appealing to many.
Software engineer do a lot more than just "write code". They communicate with stakeholders, help design and spec out the product, participate in team sessions, etc, etc.
Yeah, my point is that software engineering may end up becoming just exactly the things you have listed without the writing code parts... and that is probably going to annoy a lot of software engineers, not to mention the fact that other types of people who would never write code could be better at communication, design etc