Companies that let SW engineers go because of productivity improvements are being stupid. These people will go and build new products, and will compete with your company.
If your company is a big corporation, I don't think they need to worry about the file and rank SWEs. I know that I'm going to compete with Google, Meta or Microsoft. But stupid or not, that's what they're doing at the moment.
Yeah they don't need to worry about them, they will just probably join some startup that the bigco can eventually buy, instead of innovating internally, it's just bad management as usual. Bigcos might not see smaller companies as a competition, but they do compete with them for SW engineers.