That is racism.
And there are other ways. You punish people who are racist and you acknowledge that as the reason for their punishment, but you help people based on their situation. If they happened to be in that situation because of previous racism, that in no way has to be taken into account in how they are treated going forward to help their current situation.
Sorry, but as soon as you use race as a means to classify another person for a decision you need to make, whether your intentions are good or not, you are being racist, and you are perpetuating the line of thought that is at the root of the problem.