One trick I've found is copying the status table from the settings profile that I need to re-push, pasting it into excel, transforming into a table and hiding all the "installed" status devices, and then using =textjoin(" OR ", rangeOfCellsContainingSerialNumber, TRUE) to make a search string. then you can pull up only devices showing OOD or Not Installed status and push the sync commands.
Look like it dosent do it correctly because I have like 50% student showing ok on each class. but still pain dosent want to do it manually for each device . And we can't know who is working or not before opening Apple Classroom and monitor one class or if the teacher tell us. Even if we see success on profile deployment few device dosent show online.