As for the lack of initial secrecy, that may have just been a practical consequence of why we won. NASA and JPL opened subcomponent development to private industry. At least in propellant development, this meant both research contracts and a general understanding that someone coming up with particularly good products could expect a massive government payout.
It produced great results and even got private investors to foot a large research bill. It also had the consequence that the work was rather less secret than it might have been - especially the failures, which were generally shopped around to other buyers if they had any interesting properties. But it worked out pretty well overall: even with Russia getting info about US efforts, the rate of new research was still impressive enough to be thoroughly competitive.
Anyone looking for an internal account of the (propellant) story might enjoy Ignition. It's free here, though Chrome can't handle the pdf: https://library.sciencemadness.org/library/books/ignition.pd...
This is one of the handier arguments to use against moon-landing deniers. If the Russians had the slightest reason to believe that we weren't doing exactly what we said we were doing, they'd still be laughing at us.
The entire Soviet space program was an unsustainable exercise in political showmanship, and 'Me first!' moments.
Consider the visiting cosmonaut program, the first woman in space (Who was also the... last woman in space, for the subsequent two decades.)
Consider the secrecy surrounding launches (To avoid getting egg on your face, if the mission fails/is aborted...)
Fortunately (Or unfortunately), if it weren't for political showmanship, neither country would have had a space program.