I do not accept the premise that morality relies on “just being good for the sake of being good”. I see two independent components to morality:
(intention) + (result) = extent of moral goodness
So if your intentions are completely noble, but something goes horribly awry and you end up hurting people, it seems fair to call the net of that action not completely moral. E.g., my horrible roommates want to have a clean house. Nothing wrong with that. But in the process of seeking a clean house, they are making my life horrible.
Let’s call the desire for a clean house +2 morality points. Not super moral, but a little bit.
Let’s call the result of this intention—that is, the extent to which they are making me miserable— -50 morality points.
2 – 50 = -48 morality points.
Roommates fail at morality.
In your example, if someone is getting paid to do good work, I don’t think that has any bearing on whether or not his/her intentions are good (well, in the abstract—practically, we could have a whole separate discussion on greed and how money influences psychology/behavior). I can get paid to do morally righteous work AND do it because I am a good person who wants to do good in the world. Those two factors can coexist and not interact with one another.
But this whole answer is cheating, because we have not yet agreed upon definitions for “good” and “moral”, and I think that problem is really at the heart of this discussion.