Students are not only workers, they are also disciples of your work and, once forced to read it, will likely use it in the future even when they leave your lab.
Even completely egoistically replacing students with AI is shooting yourself in the foot in the long term.
I think also at the end of your career in science, you are going to care a lot more about the people you've uplifted and turned into flourishing scientists themselves vs however many papers you've gotten your name under. At least for every professor I've come to be close with in my years in academia that is certainly the case.