I agree. It sounds very much like an employment relationship - the fact that you can't/don't feel able to choose your own projects is a big red flag here.
If this were a standard situation within Europe/the EU, I'm confident you would be entitled to claim the rights of employment, including e.g. paid holiday. It's possible that this right would extend to a Chinese employer, although I'm not sure.
If you are genuinely self-employed, you should also have the freedom to employ other people to cover your work.
In fact - it isn't racism, according to the link you have provided.
"Racism is the belief in the superiority of one race over another."
Superiority is a key word here. The link actually ends up on the page for supremacism:
"Supremacism is an ideology which holds that a certain class of people is superior to others, and that they should dominate, control, and subjugate others, or are entitled to do so."
How much of this discount is for tracking, and how much is pure price discrimination?
The barrier of carrying a card allows the supermarket to give a discount to customers who are motivated by that, without needing to give the same discount to everyone.
The value of the tracking is probably irrelevant to how they set the price: it is not that loyalty card discounts have increased since tracking has become more valuable.
If this were a standard situation within Europe/the EU, I'm confident you would be entitled to claim the rights of employment, including e.g. paid holiday. It's possible that this right would extend to a Chinese employer, although I'm not sure.
If you are genuinely self-employed, you should also have the freedom to employ other people to cover your work.