The same way that France did it; by building quite safe nuclear in series with massive government subsidies. A bit like China today.
After the accidents showed that these designs where just not quite safe enough, redundancy in the safety systems were added. The thing is; as soon as those reactor designs got a bit more safe, they got much more expensive quite quickly. Just look at France's history of nuclear reactor development.CP0, CP1 and CP2 were somewhat cheap and they were able to churn out the things in quite a number.P4 and P'4 were already much more complex, more expensive and it just wasn't possible to mass produce these things like before. By N4 the economy of scale had broken down almost completely.
That's the problem with nuclear reactors. They are simple in principle, but fiendishly difficult in practice and enormously complex. So complex indeed that the learning curve doesn't yield any compounding returns. That's what we've seen play out in the last 50 years.
I don't know how things evolved in Sweden, but I assume that Swedish reactors don't have all the safety features of modern reactors. I guess that's what made them cheap, just like the CP-series in France.