You have very optimistic assumptions about AI. Of course AI will not "replace you" on its own, but some person in the company will decide it.
I am in careers that is one of the more sheltered from automation. Present tech layoffs I suspect are more due to insane overhiring during covid as well as outsourcing. I am sure some companies have gone to full AI psychosis -mode, but they are taking a massive risk. Time will tell.