Give the Ankles Some Attention
Many coaches teach the squat, or try to correct problems in a squat, starting at the wrong point in the kinetic chain. The place my eyes first go to when trying to break down someone's squat is their ankle movement.
A lot of coaches try to get people's hips or knees to do this or that, all the while ignoring that if the ankles aren't moving properly, the knees and hips can't move properly for efficient load distribution. For the hips to open up, you have to have adequate hip abduction. The knees should move out to the side when that happens very naturally. However, if the ankles are pronating and not supinating, then none of that will ever happen.
Now there are times when the ankles supinate because the glute medius is simply too weak to hold proper position of the kinetic chain, but that can be tested with light weights (during warm-up sets). If the lifter can hold position during warm-ups, but then loses it, mobility isn't the problem. They just aren't strong enough to hold that position.
More often than not, what you'll see is a degree of inward ankle rolling the entire time during the warm-up sets. If this is the case, then the lifter will have knee valgus just the same as if the glute medius is weak. You have to determine if knee collapse is happening due to lack of ankle mobility or weak glutes. More times than not, it's really the ankles that are the culprit.
Those with flat feet or fallen arches will have the most issues with this. And if that's the case, then a balancing drill that forces them to produce force from a position of ankle supination will often remedy the problem.
If it's due to a tight Achilles then doing heel-elevated squats for a period of time and reducing the height of the elevated surface (until no elevation is required) will often fix that as well.