Fact or Fiction?
AI/ML is in no danger of replacing software engineers. At best, it is capable of generating simple code, not design and the code to go with it that is efficient, scalable, supportable, etc. I use AI/ML for simple, repetitive tasks in my coding, usually having to correct the generated code, or ignore it altogether as being worthless. I started writing AI/ML with MS's ML.NET years ago, and see a lot of good uses of AI/ML, as long as the software engineer sticks to reality and not science fiction and fantasy.
AI/ML is not capable of thinking or reasoning alone. AI/ML can only do what it has been trained to do, which depend on humans with very large training data, which makes the AI/ML generative output limited to how good the training data is (which depends on how knowledgeable the humans that made the training data).
I see the future of people working in software engineering to be one where coders, hackers, "script kiddies", etc. will be largely (but not totally) eft out or replaced, but those who approach software engineering holistically with engineering and business acumen, and understanding users, able to think creatively and with deductive reasoning, to do well and have long careers.
AI/ML is a good tool (of many tools) for such software engineers but can never replace them. AI/ML replacing software engineers is pure science fiction.