People in non-critical jobs (like teaching, for instance) are one thing, but critical jobs (like police, or firefighting) should be required to do their job until their contract is up. In comparison, we have one set of jobs that is very clearly structured this way - in the military, once you join, you cannot choose to leave, you cannot decide not to do your job in order to argue for better conditions, you do what you are told until your contract is up, or you are brought up on charges.
I would therefore argue that critical jobs that the public cannot effectively do without should be similarly handled. Criteria essentially being: anything that even a relatively short disruption of, has the high likelihood of causing immediate and widespread damage to people, infrastructure, or property. The prospective employee should sign a contract for a certain period of service, and until that service is complete, they should not have the option to either leave or refuse to do the job. ‘Blue flu’ and people organizing themselves to call in sick at the same time can similarly be headed off with rules against any conspiracy to negatively impact the performance of the job. Off-hand, the main jobs I can think of that I would include here are law enforcement and the fire department - a city without law enforcement will quickly find itself prey to looters and violent criminals of all sorts, and a city without a fire department will probably have widespread fires and such. Garbage collection could be considered within that criteria, but I suspect that since it requires no special training, no particular efforts are needed to retain existing employees: sanitation workers can refuse to do their jobs, be fired and be replaced before the problem causes significant disease and therefore a widespread public health hazard. I imagine there may be a couple other jobs that are similar in nature and fall within the aforementioned criteria that I’m not immediately thinking of as well, though.
Part of the key of a system like this is that people need to be enticed to sign those contracts (and renew if possible) so if working conditions in such a field are terrible, it’s likely something will have to change in order to keep the necessary number of employees, or many will not renew their contracts, word about the conditions spreads, and others do not sign up in the first place. Consider how the military deals with this in times when more soldiers are needed: they up the incentives to sign up, offering higher pay, benefits, etc.
Jobs like teaching, on the other hand, are not so critical as to cause immediate widespread damage should they not be performed for a time. So, something like a teacher’s union? I’m not sure where I would actually stand, if I had to answer the question in a forum where my answer has meaningful effects. Teaching is very important, but it’s also something that can be delayed for a time without catastrophic effects. If the union is making unreasonable demands that the public/legislature is unwilling to meet, there is no emergency need to get them back to work quickly; they can all be fired, and take as much time as is needed to hire replacements.