The bright side is that analytics engineer is a relatively modern job title, previously it was largely bundled in with data engineer, and before that, data scientist. So you're either already relatively early in your professional career or have adapted between programming disciplines once already.
I also (personally! I'm in data engineering for my part) feel it's one of the safer roles from an AI perspective. Yes, you'll be writing a lot less code in the future, but that's never been the particularly difficult part of your job: SQL is dead easy to use.
The difficult part is picking up all the business context and knowledge in order to work out the best ways of representing complicated and messy data for the business. AI can help to some degrees there, but if you're great at your job, your judgement is going to be built on so much business context that both can't be written down and would be too vast to feed into the model.
Sure, AI can do some of the job, but you'll always thrash it in terms of quality (whilst getting to spend less time doing the busywork of just writing your thousandth predicate of the day!). And worst comes to worst, all the business knowledge you have in your head makes moving into analytics a far more viable lateral move.
And that one is definitely AI proof. If all companies use AI for their analytics, they're going to be moving largely in lockstep with each other. Humans might be far worse, but often far better, so I'd be willing to bet that through sheer randomness that over time companies using human analytics will outperform those relying on AI.