Also you could just a easily give extra accommodations, etc. For those who do work. I bet you if you just give someone(who doesn't work or want to) a small house and food, no form of entertainment, no holodeck, and no replicator, they would get and find a job even if its cleaning the streets.
If one person is just living off the system and receives basic shelter and food, but someone else who does work receives perks like better housing, food, clothes, travel, etc., then you still have "money' just in a different form. You're not getting folding money, you're building up compensation in an account somewhere, and while that not physical currency, it is "money."
All money really is, is a medium of exchange. It's also compensation for effort, but it's not always cash.
much of the hard or menial labor would be shouldered by machines leaving the population to concentrate on other pursuits.
Problem is the 24th century
that we've seen holds very few robots or mobile machines. They are an oddity, not a standard. In the episode where Troi is taking her bridge officer qualification test, she doesn't casual tell LaForge to send a robot into the radioactive chamber, she sends LaForge himself ... to his death.
.