Where Trek went wrong was the Picard line noting "economic systems" as a thing of the past.
That's like saying "energy" was a thing of the past.
He may have been referring to "currency-based economies" but competition for resources was clearly a 24th century reality. The Barzan wormhole, for example. Stubbs' egg, for example - where the resource was knowledge, and then the right to live in peace. Countless bids for vaccines and weapons. Just a few examples off the top of my head.
Economics = the physics of desire. Conservation of energy. Equal and opposite reactions. Economic laws still at work. Still plenty of resources to compete for in the future. Captaincy of a starship, for example.
I sometimes wonder about this topic, it is fascinating! For instance, in reality if there were replicators, the first thing people would replicate would be replicator-disrupting devices - and of course, sell the anti-disruption solutions.
This question makes me wonder one thing: can the medical industry allow cures for disease?