If that's the price to pay in order to rescue vulnerable people who are being exploited and trafficked, very much so. Sex work is a decadent luxury at best; human freedom and agency are worth so much more.
> thereby putting them in danger?
There's no proof that legitimate sex workers are being "put in danger". They might be de-facto forbidden from engaging in that line of work, but there's a solid rationale for such a policy; it might just be the best we can do given our broader circumstances.