You had the answer yourself. Legislation. Government-run factories for the benefit of the people.
Even if that's not possible, that's what we should strive for
As soon as there is no personal incentive (or real ability) to improve things, the tech sector starts to stagnate and fall behind the rest of the world.
With renewable energy, etc, the country shouldn't fall apart like USSR did, but it is almost certain to fall prey to more entrepreneurial/militaristic neighbors, sooner or later.