I wonder if this could be solved by student worker unions?

That would "solve" the problem in the sense that it would make students even more uncompetitive with AI.