Well, how many people in the 24th century have jobs? Maybe most of the human population, or even most of the Federation's population, are idle. There must be a reason humans don't use currency-based economics. Maybe it's the replicator.
Or maybe... you know, it could be simple robotic/computer automation of, practically everything.
WE are already able to automate 75% of the global workforce with the technology readily available today, whereas 99% (or essentially VERY close to 100%) can be automated in less than a decade, because we are at a stage that we can automate tasks that hadn't been automated yet.
Robotics, computers, - mechanization/automation.
Most of the production industry today is mechanized.
Trek Humans have supposedly been using their technology for betterment of everyone (and not just the select few) since First Contact with the Vulcans.
They would already automate everything they could in the 50 years following FC (even though realistically, it could be done in less than 10 years with OUR technology - however, lets give them some leeway due to the WW3).