1) The game is not ending, it's changing. AI can sling a lot of code but we still need engineers that actually understand what the hell is going on. That's always been the bottleneck. It could eliminate junior positions, but seniors are fine for now.
2) It's been a hard lesson for me to learn because I'm naturally a contrarian, but you are hired to do what management wants you to do. If you resist, your best bet is to hope they don't notice or care, but it's not going to change much.
If you eliminate juniors over the next few years, there will be no seniors for the future when the current seniors retire.