Yes, when a desperately poor person accepts a bad job, the problem is not the availability of the bad job. It's them being desperately poor. And eliminating that bad job will likely harm them more than it helps them in their effort to improve their situation.
There's some health and safety risks associated with sex work, but we have a good understanding of how to mitigate them. Shutting down the safer oprions does not do that. Sex work also come with the risk of arrest and a criminal record; which is entirely the fault of current laws and law enforcement.
Amazon warehouse work is highly destructive. In 2019, they had an 8.8% injury rate, with 90% severe enough to interfere with work duties. The working conditions at amazon warehouses have been a national scandal for years.
If they are willing to do illegal sex work out of desperation, their inability to earn that income could be far more destructive to the individual than the sex work. That's an uncomfortable truth, and avoiding it leads to a host of harmful prohibitions, whether it's on sex work, work for under minimum wage, micro-housing units that are under minimum floor space ordinances, or buildings that are over maximum density caps, etc.
Prostitution is the oldest job in the world as they say. Only a Star Trek post scarcity economic miracle will eradicate it.