There are laws requiring workplaces to be as safe as reasonably possible. None the less, some jobs just
are dangerous and can't be made entirely safe. To take an obvious example, a soldier on active military duty faces some risks, and they're inherent in the job.
I don't know exactly how employment law applies to the armed services, but I expect the upshot is something like this: the army has an obligation to do things in a way that e.g. doesn't make accidents needlessly likely, but if you are a soldier fighting a war then you might get shot and that's just part of what they pay you for.
Employment laws may or may not already be drafted in a way that makes them suitable for applying to sex workers, but in principle the situation seems to me very similar to the one I just described. If you are (say) a pornographic actor or a prostitute, then you are going to be having some sex that you wouldn't otherwise have chosen to have, and that's just part of what they pay you for; but your employers are still obliged to protect you from (for instance) being sexually harrassed by your boss.
So, sure, it's a special case and the laws might need to be written carefully to deal with it, but that's not unprecedented. (In particular, if your intended subtext was something like "... so sex work should be illegal because it's fundamentally abusive" then I think you need to explain why we don't have to outlaw the military, police, and other groups that are necessarily exposed to substantial physical danger in the course of their work.)