You’ve got it backwards. The Star Trek universe is depicted as originating out of a recognizable United States. Warp Drive was of course, invented by a Musk-like individual in Montana, not a committee or government. Cochrane is depicted as having no particular moral philosophy and as having invented warp drive in pursuit of profit. It’s very clear that post scarcity came first and the socialist/military model came afterwards.
It’s notable that while Roddenberry had various humanist philosophies, TOS and TNG more than anything resemble the U.S. military officer culture, reflecting his Air Force service. You’ll see the exact same culture if you walk into an officer’s club at the U.S. Naval Academy.
I'm not sure I want to argue how a fictional universe's fictional history is arranged.
I can tell you however, that in the real world, with real incentive structures, if we remove scarcity before we fix ownership, we will get a few feudal lords and the rest of us lacking any leverage their dependence on labour used to give us and dependent on their (historically rather limited) charity.
You cannot have a Star Trek future if you don't fix the social part first. Technological progress will make the social issues worse otherwise. There is no point of technological progress that will magically make the rich and powerful suddenly give up their wealth and power. Maybe in a made-up world, people are less power hungry and greedy. In the real one, more technology owned by a few effectively means that their concentration of wealth and power will just keep increasing at the expense of everyone else.