No, it's not true at all. It takes no account of the standard of the school, the teachers, peer group, bullying etc.
I left primary a straight A* pupil to go to the local comp. I left after 5 years without a single pass mark at GCSE. That was down to intensive/serious bullying on a daily basis, not just verbal, but also physical, including being punched and kicked, burned with fag ends, etc., and theft of property, i.e. my school bag, money, coat, etc. I reported it to the form teacher, then when he did nothing, the head of year, who also did nothing. I was constantly told to fight back, avoid them, etc. That's hard when the teachers kept pairing me up and putting me into groups with them (the worst offenders were next to me alphabetically and most teachers lazily set seating plans/groups etc by alphabetic order), so I simply couldn't avoid them! I used to hide at breaks and lunchtimes so they couldn't find me.
I finally escaped aged 16, and went to college to get my GCSEs and A levels, which I passed with good grades, and then went on to a professional masters qualification, again passed with high marks. I'm now a qualified professional.
My "education" only started once I'd left the hell hole of the comp. I was lucky that I was able to get my GCSEs and A levels which led to a minimum wage job in a tiny father/son accountancy practice where I worked my way up, studying evenings and weekends.
So, no, "bright" children don't do well "anywhere". If they are unlucky enough to find themselves in a crap school with teachers who don't give a toss, they're going to struggle.