Sure, communists were elected to the government of the Czech republic up until the latest election. That only tells you that a share of the nation is radicals -- enough to elect some radical candidates to represent them.
But to actually become a communist nation, you need to confiscate the means of production from the rest of the nation. First, you don't get that just by winning some seats. You don't even get that by winning a majority of seats. That's a constitutional rewrite situation, not a political party situation. Something like that requires seizing control of much of the organs of civil society -- you have to get courts to not honor private property, for instance.
> In both countries they already held ministerial positions, so this just isn't true
Holding a ministerial position does not correspond to being able to eliminate private ownership of capital. The two are rather different.
> In practice they'd likely end up becoming more moderate, like happened in San Marino
The Most Serene Republic of San Marino? The 10 square mile tourist trap? Now you've lost me. If your claim is that these communist ministers would realize that they can't actually make their nation communist and just keep the name of communism while advocating for vaguely social democratic reforms, then absolutely. But that does not make the nation a "moderately communist" nation, it makes it a social democracy. Or are you one of those people who thinks social security is "communism" and your definition of a "moderately communist" country is present-day France? Is that what you mean?
And nationalisation of "private property" and land reforms have happened outside of communist governments, e.g. in Nasser's Egypt, the Mexican oil reserves, Mossadegh and the Iranian oil reserves, the Shah's White Revolution, etc.
My whole point is that communism and communist parties didn't need to be seen as some radical "other" system, but could have become more moderate as society gradually accepted strong trade unions, co-operatives, and nationalised resources without the Cold War (much like the transitions to parliamentary democracy). Unfortunately the Cold War polarised everything, and now we're stuck with a society where the existence of billionaire is sacrosant.
I mentioned San Marino because they were governed by the communist party for 10 years, and weren't so extreme - https://en.wikipedia.org/wiki/Sammarinese_Communist_Party
Because they never tried to make San Marino into a communist economy, seeing as how it is not really an independent nation with any kind of economic sovereignty. The only thing it does is sell its own postage stamps and sell some commemorative gold coins. It's a big castle surrounded by some vineyards. They make money from tourism and duty-free shopping, and of course tax-avoidance.
It's like if you elect a communist to be the leader of your Elks Lodge, and then praise his moderate communist rule.
They were far from alone in doing so, notably Marx and Lenin agreed and advocated for similar trajectories, so it was far from a fringe position.
A popular communist program for developped countries is to remove all political influence as a result of money, encourage cooperatives, nationalizes key industries (as in China), and manage productive surpluses to provide for everyone, removing markets where they are zero sum of negative sum (housing, etc...), and coordinating markets for optimum growth, until the economy is developped enough that the entirety of the local economy can be ran as either part of the nationalizes sector or by cooperatives.
It's a fairly mild program when compared to Stalin. There is not really any reason to abolish private property until the economy is large enough that it can be fully run by the workers from a communist point of view - Stalin did it because he judged that heavy industry was not developing rapidly enough, which was a strategic judgement mostly on grounds of the preservation of the state (and therefore himself). Otherwise Lenin's policy of managed capitalism/socialism for a hundred years or so was in place.
Stalin was a lot less patient on this and instituted forced mass collectivism, with catastrophic consequences.
No one believes that foreign investment is anything more than a necessary evil - being reliant on foreign investment means that you can't mobilize your own capital.
The idea that markets are necessary for some industries is not at all incompatible with Marxist economics. Lenin's side of Marxist economics would be fine with markets as long as the property was owned cooperatively, until a post-scarcity society.
Stalin's turn towards state planning was out of perceived necessity, not because he was less patient. He, and others in the party, decided that it was acceptable to sacrifice overall economic development in order to develop the heavy industries necessary for war with capitalist countries, that he thought was inevitable if they were too weak. That, and he thought agricultural development was too slow. While it was a failure for agricultural output, it was objectively a massive success in its primary goal, and development of heavy industries at the speed of the NEP would have probably led to the USSR losing WW2.
In both countries they already held ministerial positions, so this just isn't true.
In practice they'd likely end up becoming more moderate, like happened in San Marino, and eventually France too.