If China got rid of all religions, so that atheism triumphs over theism, science over superstition, and materialism over idealism: would China be a much better place? Is that an end worth striving for? (Assume they do it through wide-spread education rather than banning outright.)
Yes, it would be a better place, and yes, it's an end worth striving for.
You make it more complicated and confuse the issue. What is this materialism over idealism tosh?
If/when rational thought triumphs over theism the whole World will be a better place.
I agree. (Had to happen sooner or later.

) Except that
if rational thought triumphs over theism, it will be because the world has become a better place, one in which people no longer feel the
need for religion.
'Materialism' is 'a doctrine that the only or the highest values or objectives lie in material well-being and in the furtherance of material progress' (according to Merriam-Webster).
'Idealism' is what some atheists do when they promote materialism.
Would it be fair to say that your criticism about what the Chinese Communist government is doing is about means rather than ends?
GDon picks
one of the definitions of materialism - and it's not the one that you would usually think of in the context of social or political philosophy, which would be:
Definition of materialism
1a : a theory that physical matter is the only or fundamental reality and that all being and processes and phenomena can be explained as manifestations or results of matter (see MATTER entry 1 sense 2)
scientific materialism
b : a doctrine that the only or the highest values or objectives lie in material well-being and in the furtherance of material progress
c : a doctrine that economic or social change is materially caused — compare HISTORICAL MATERIALISMmaterialism noun (Merriam-Webster)
If the current leaders of China were materialists in the sense of the
c definiton, they wouldn't be trying to
ban (certain kinds of) religion. That is actually an
idealistic approach to religion and superstition.
Instead, they could have used the
materialistic approach and tried to find out
what religion is and
where it comes from, which they could have learned by reading the first page or two of Karl Marx's Introduction to
A Contribution to the Critique of Hegel’s Philosophy of Right:
Religious suffering is, at one and the same time, the expression of real suffering and a protest against real suffering. Religion is the sigh of the oppressed creature, the heart of a heartless world, and the soul of soulless conditions. It is the opium of the people.
The abolition of religion as the illusory happiness of the people is the demand for their real happiness. To call on them to give up their illusions about their condition is to call on them to give up a condition that requires illusions.
The Chinese leaders have chosen the
idealistic, top-down approach (corresponding more or less to
Merriam-Webster's definition 2a(2) by trying to ban religion instead of improving the living conditions of the Chinese:
'I, the ruler,
decide that people should stop being religious. I don't need to know
why they are religious and try to remove the
cause of religion, i.e. the miserable circumstances of their lives. I simply tell them to stop, and if they don't, I punish them.'
(By the way, Hegel says that when an idealist is opposed, he sooner or later responds with violence. The behaviour of the Chinese leaders is a good case in point: 'We don't want people to be religious, we tell them not to be religious, and when they don't obey, we punish them.'
Who cares
why they're religious, right?!)
So the leaders of China may be
atheists, but they are also
idealists.
Marx was an
atheist and a
materialist, but many people who call themselves historical materialists are actually idealists like the ones in China.
The Cuban approach to religion has been very different, and they seem to be much more aware of how the real world works: In the 1960s and '70s, they were hard-core atheists, but at the same time they primarily tried to improve people's living conditions - and managed to do so to a very large extent: jobs, education and health care for everybody. But when conditions worsened in the 1990s, they seemed to accept that in those circumstances it would be
quixotic, i.e. idealistic, to try to
ban or
suppressreligion. There were more important things to fight.
Their approach to prostitution was very similar: They managed to purge the whorehouse of the USA in the 1960s and ´70s - not by punishing the prostitutes, but by retraining and educating them and providing them with meaningful jobs and thus an income. The UN recognized that prostitution had been abolished in Cuba.
But it was to return in the 1990s with a vengeance ...