The first flights were more risky than later ones. They made improvements. But there were many close calls (including main engine failure).
But SpaceX necessarily WILL be safer because they're using a proven vehicle and a more robust capsule. Plus a launch abort system. Shuttle flew crewed on the very first launch.
There's also the concept of the "Drift into Failure", which I believe was coined by Sydney Dekker (https://www.amazon.com/Drift-into-Failure-Components-Underst...), where small compromises in operations eventually cause very important security and reliability protections to be eroded away.
i tend to think this is a strength of the Russian R7/Soyuz: the vast majority of the R7 launch family launches are uncrewed (and with a lower level of "mission assurance," i.e. less double-checking), therefore any systemic problems (i.e. due to "drift into failure," etc) are almost certainly going to be caught in an uncrewed launch first. Likewise, uncrewed Progress cargo spacecraft missions use a very similar platform as the Soyuz spacecraft, I think on the same line, so problems with the spacecraft can also be found on uncrewed missions.
Falcon 9 is planned to launch maybe twice a year crewed, compared to 20 or 30 uncrewed launches (including like 2 or 3 uncrewed Dragon launches), meaning any new systemic problems with the launch vehicle will almost certainly pop up in an uncrewed launch before they result in loss of crew. Shuttle ONLY launched uncrewed, therefore any systemic problem which resulted in a loss of vehicle necessarily resulted in loss-of-crew.
Yes, so in the F9 case, that only works well if NASA doesn't insist that the one crew launch per year doesn't use a super-unique rocket. Which appears to be something that the safety committee appreciates, but maybe not far enough.
> Shuttle ONLY launched uncrewed, therefore any systemic problem which resulted in a loss of vehicle necessarily resulted in loss-of-crew.
Don't you mean that shuttle only launched crewed? Either that or I think I do not have the same definition as you do for "uncrewed" -- I take it to mean that there is no crew on board?
One of the three SSMEs failed on STS-51F https://en.wikipedia.org/wiki/STS-51-F due to sensor malfunction. Another engine nearly failed for the same reason, but quick action from the crew prevented shutdown. The Shuttle performed an Abort-to-orbit, meaning it continued to a lower contingency orbit.
And STS-93 had a pretty bad close call, too, with some of the engine coolant lines rupturing in-flight (leading to early shutdown) due to a oxidizer post plug coming undone as well as an electrical short taking down some of the engine controllers. That was pretty early in flight, so would've been incredibly risky in the case of an abort. https://en.wikipedia.org/wiki/STS-93
Falcon 9 has higher levels of first stage redundancy than Shuttle (can lose a first stage engine immediately at lift-off and reach orbit just fine, and lose multiple engines later in flight), and uses just a single upper stage engine, reducing probability of failure.
But SpaceX necessarily WILL be safer because they're using a proven vehicle and a more robust capsule. Plus a launch abort system. Shuttle flew crewed on the very first launch.