I strongly agree with almost everything you wrote. Taking the locale example, and using my own state as an example, most counties have their own school system, and a handful of cities have their own school systems. Even within a single county's school system, the disparities in results between school are very significant. They also track, almost 1:1, with socioeconomic level, and that in terms very closely tracks with race. I'm absolutely not making an argument that race is a cause of educational disparities, though I would not rule out any genetic impact, but race and socioeconomic level are tightly correlated almost everywhere in the United States (and really, the world).
I googled a few lists of top US states by K-12 education. There are a lot of variations, but, as you said, New Jersey (just over 50% white) shows up near the top in most, so does Massachusetts (another state with huge immigrant and non-English speaking populations, but that is still ~75% white). Many of the other habitual high achievers are small, (more) homogenous, wealthy. Even the link between spending on public education and success isn't written in stone. California, for example, spends a lot, yet gets a pretty middling result on average.
The "homogeneity" argument as you call it, and I would note that I listed 3 criteria present in most of the top countries, primarily small, ethnically and culturally homogenous, and wealthy, is just one part. All three are important factors. South Korea, Denmark, Netherlands, Belgium, Slovenia, Japan, Germany, Finland, Norway, Ireland, Singapore from one list. Most are small (Japan/Germany/South Korea definitionally), most are wealthy (I guess Slovenia would be lowest?), all are pretty ethnically and culturally homogenous, with some variations. It will be interesting to see if, for instance, Germany's results change given the massive population change in the last 10 years there.