I would say something similar to what you described above happens to me about once a year or so. It's the lobby experience that United can't seem to get right, and it's been that way since as far back as I remember (even as a kid traveling around the US during summer holidays).
It's almost like they need to implement some sort of electronic queuing system that takes into account time to departure, checkpoint queue, distance to gate, status and cabin class, and that perhaps this system should update a list of names on a screen in the check-in lobby similar to the standby lists at the gate. The agent can then call people in the order that their name bubbles up to the top of the list.