Look at Vietnam today. We have great relations with them. And their economy is no longer controlled by the government and they have opened themselves up to the market.
So if other countries wanted to become communist in the '70s, let them. It was unlikely to prevail in the long term.
Although history may at times seem to have the air of inevitably, it ultimately revolves around human choices. The world was trending against the US and its allies, with communism a powerful and going concern that might well have prevailed except for the election of Ronald Reagan in 1980. On that hinge history turned.