I spent the whole time reading the article thinking "so you got scammed by people looking to find a way to hide prejudice behind ML? What a surprise..."
Maybe the lesson here is that people doing unethical things will take the opportunity to do more unethical things, like not pay you, and it may well be in your self interest to apply your ethics when choosing a job? Upwork doesn't look great here, but seems like it's hardly the whole problem.