I am a parent and I work in education. I guess it how you define "do well". Are you look at academics or social, emotional? Are you looking at comparing to a "potential" for that child? Or are you looking at a "good" to "brilliant" overall grade?
I mean purely academically, obviously a child who is capable of 10 6+ grades, including some 8s+9s can drop down to say a couple of 7s and a couple of 4s and then mostly 5s+6s and they still have enough passes to do A-levels and go to uni. Someone capable of 10 4s-5s drops down a few grades and they are left with just a few passes. So yes the brighter child has "done well", the less able child hasn't.
However, looking at "passing GCSE" is a very narrow definition of "do well". I would suggest, that "doing well" needs to be about achieving their potential academically, so if they are able to achieve higher grades, but aren't being supported to do so, then they are not "doing well". I would actually argue that a school could be getting lots of 5-7s, but if a lot of those children scored high earlier in the system, then they could be failing to push brighter kids. Equally a school could be getting lots of kids come in failing to really read or write, and their GCSE grades could be abysmal, but their "value added" to some of the less able students could be the difference between them being fairly successful in being independent and not really being.
That is without all the other, highly important, non-academic stuff, like whether the child is happy, has good self esteem, has made friends, etc. This stuff is generally more important to their overall well being, then the academic.