The ability to abduct the legs is a mobility/flexibility (don't know which is which) issue.
The ability to maintain the "knees out" position under a heavy weight is strength issue. It is the glutes function to keep the knees tracking correctly.
IIRC its the medial glute.
I've had this issue. I stand pretty wide when I squat and half a year ago my knees would buckly in slightly in the bottom of squats. I suspect this had a role in my knee problems.
What I did to fix it:
- Activate glutes before squats so they fire properly in the bottom: band X-walks, have a rubber band between the knees on squat warm ups (so I have to actively force the knees out), wide stance box squats (done without rocking off the box - just stand straight up with power from the legs and glutes)
- Do lots of hypertrophy work for the glutes and hips: reverse hypers, glute bridges, lunges, deadlifts, RDLs, etc....
- only squat with a weight that I can maintain good position in. That is, start over with perfect technique.