Thing is, it's not ten million - it's several orders of magnitude fewer, particularly if we're starting with just a selected list of generators.
Also we know the locations of the generators, so we can calculate the phase shift and control them accordingly. At thousand kilometres it's around 60 degrees anyway, so not catastrophically huge.