The US k-12 school system is well understood to, as a first approximation, optimize for average or a bit below. There are often carve outs for interesting tracks for kids.
I'm not sure the right approach. Rigorous testing and sorting from an early age into silos of tracking kids has its own major flaws.