If they have to pay to get it to work again, that would take care of the motivation to work part.
The main difference between that and today is the replicator provides full abundance. Nothing is too expensive to make, so everyone has the same access to good food or clothes.
It at least makes sense for why everyone works at all types of jobs or have businesses.
Problem is? Trek doesn't really suggests this happens. Food, clothes and a lot of other things are free, and there is no want or need.
That has to mean someone volunteers to fix your replicator or waste extraction unit for free-- for the enjoyment of it.
There seem to be a lot of illogic and contradictions in the Trek economy.
I suppose the biggest industry in the Trek universe would have to be the replicator industry since that is the magical machine that makes the Trek economy work.
Is every household, or individual, provided a replicator for free? or does he/she have to pay for it?
If nobody is to go hungry or have their needs go unfulfilled, then the replicator should be for free, right? And if the replicator breaks down, the repair should be done for free too, right? or be provided a new one, lest that household goes hungry.
What if someone can't afford a replicator? Is he allowed to leech off someone or business that has a functioning replicator? Or are there replicator centers that are open and free to all? Then what is the point of working?
If every thing is working just fine, then what are the people, who actually work, working for? If Trek is a moneyless society and people are not being compensated, what's the motivation to work? or to work hard? Just take a vacation.
As Picard said in "The Neutral Zone", "the challenge ... is to improve yourself. To enrich yourself." By enrich, Picard didn't mean material, monetary enrichment.
What if someone wants to pursue his artistic dreams that don't provide much if any benefit to society, is that still consider "work" that is worthy of getting a replicator?
What if someone wants to stay in the 24th century equivalent of college for the rest of his/her life, is that pursuit of personal enrichment considered worthy of receiving a replicator? It beats working for a living.
By the way, whoever controls the replicator industry would be quite powerful and will be able to manipulate the economy and politics.
I suppose if they are asked how exactly does the Trek economy work, they would give the magical answer, "very well, thank you".