I'm all for science spending, and a moon shot is probably about as good as any other way to funnel money to scientists and engineers. But let's not be disingenuous that this program was the only possible way to spend money on science.
There wasn't a market demand for computers that would justify the R&D budget that Apollo was given to develop computers to the level that was required to get us where we are today.
Where we are today is a result if the work that IBM did not related to the space program, the work that was done for the space program, and the work that was done because of the space program.
The scenario you're describing only has the first one, but not the other two.
Public schools for black kids must have been really amazing.