For the ranging system specifically, they could do most of the testing on Earth. As long as they could predict the antenna behavior at long distances, everything could be tested pretty accurately. In addition, the Apollo Guidance Computer provided the same ranging data in a completely redundant way. So even if the ranging system completely failed, they still had a backup.
The short answer is that, as you say, things were done in stages, problems were found and fixed, people did die (the Apollo 1 fire), and the Apollo 11 moon landing was a pretty close thing.
BUT! Because of this, R-7 made first successful flight from 7 or 8 try, and the same was with first soft landing - 6 ships crashed before success.
Other programs, like Buran or Lunokhod, was tested on small analogues or on bench. Examples: for Lunoknod created web wheels for Russian all-road truck, and it made thousands off-road kilometers; for Buran was created few ships analogue, program named "Bor"; for rockets, usually created prototype from parts of previous generations rockets, looking Frankenstein.
When create analogues was impossible, created very simple designs, just like programmers create micro-kernel systems.
And in nearly all Soviet human programs, except "Voskhod" (sunrise, their success I think just luck), used rule, that ship should make 3 fully automatic flights without strict remarks, before carry human.
And yes, Soviet space program was more automated then American. - Soviet ships was capable to make all things without human on board. And they even made automatic flight around Moon without humans, but all flights had big problems. But Leonov said, if human was accepted, he would be fight for survival and made success (he was really brave).
How is that true? Isn't "simply receiving and retransmitting" the signal just the same as a reflective surface, which works just fine for Doppler relative speed measurements? (I'm ignoring the retransmission increasing the signal strength over a simple reflection.)
My guess would be that the frequency difference makes it easier to detect the faint return signal over the strong transmitted signal.
Alternatively, they could extract the pseudo-random signal from the carrier and retransmit it at a different, fixed frequency. In this case, the problem is that the ground station doesn't have the spacecraft's transmission frequency for comparison, so it's hard to extract the Doppler shift. You could put an extremely precise frequency reference on the spacecraft and a matching frequency reference on the ground, but that's a lot harder than shifting the frequency in the transponder. Also, this approach only gives half the Doppler shift of the transponder approach, since you lose the Doppler shift in the upward direction.