Sex work is near-universal in human society and sex workers are arguably among the most vulnerable of all working people, with an uniquely high risk of abuse and discrimination, hence the acute need for special protections.
Yet another "they're so vulnerable, let's re-order society" push that throws around all of the right buzzwords (vulnerable, discrimination) but fails to make any real sense in a broader context.
If you want to protect sex workers then legalize and tax it
Yes, obviously we need to stop making consensual sex a crime. But that alone won't protect a type of worker that is obviously at a higher risk than food works, which is a nonsensical comparison.
So was slavery, but we don't pretend that past moral failings should make us question our modern moral understanding, as you have just suggested we do for sex work.