Yeah, where did this whole "post-scarcity" notion come from? I don't remember this term or concept ever being thrown around on the original show, let alone being as intrinsic to the franchise as people keep suggesting. By contrast, every third episode of TOS seemed to involve the Enterprise or some distant colony being in desperate need of some vital element, medicine, piece of technology, etc, because of a plague, famine, or whatever.
Just look at "Devil in the Dark," one of the quintessential STAR TREK episodes: not only are the miners hoping to strike it rich, not only is the Federation in urgent need of pergium (as Kirk constantly reminds us), but when a vital mechanical component is stolen, Scotty can't just easily replicate another and the whole life-support system starts breaking down.
Does that seem like a future of "unlimited" energy and materials? Heck, the very first STAR TREK episode to ever air featured a remote outpost in desperate need of salt for Pete's sake.