There is no rule that says you can't have performance bonuses as a government employee, nor are there any rules to say you can't have competition within government departments.
I'm no expert, but I think the problem with the Soviets were that you were not rewarded for effort, and I think we all understand why that's important.
I've read in the US there are teachers that can't be fired because of public school tenure laws and union contracts. So yeah, first thing you have to do is have a sane and functioning government. Then you can start dreaming about a better society.
Bad societies are a reflection of their people.
If you fire them, they're still entitled to a job, right? So some other agency has to hire them. The flunkies will progress from the most demanding jobs, on down to the ones where the assignment is like, "Just please collect at least one piece of trash per day, okay?" The net effect, I'd argue, is that jobs that are necessary but high-effort, like assembling important machines, constructing buildings, food production, IT support, are starved of workers because you can get paid decently for 1000% less stress to be on litter patrol, or the mailbox graffiti removal squad, or whatever.
If you pay piecework, the least motivated will just do terrible work (in many jobs a poorly-done thing can be a big problem), and if you don't pay the ones who don't manage to plant a single tree, then that's technically not a job (though it is daycare, and since you've still got to actually pay the overseers you're generating negative value on the whole operation).
> problem with the Soviets were that you were not rewarded for effort
We actually agree on the important points then, it seems. In my view of people, the ones who are motivated to be truly excellent even with the visible goal of the bonus are rare, and the ones who are motivated to cheat "the system" (which is really just cheating the rest of us who do our share) at every turn are, while not the majority, more than numerous enough to tank any system I've seen that tries to achieve aims like universal employment or true zero poverty. (And worse, they also seem to climb to positions of power of those systems in shocking frequency!) And finally, once people see the freeloaders defrauding society from both the top and the bottom, the truly excellent contributors to society are the first to flee to somewhere their efforts will be rewarded, and the reasonable middle of hard workers also do. This concentrates the low productivity further.