I think applying agency to the software in my examples is actually very pernicious. It's not the software that dislikes the ethnic minority, it's the Chinese government. Blaming the software lets bad actors off the hook.
Perhaps what's really needed is ethical standards for technology. This would have the added advantage of being applicable even if the technology doesn't feel like AI to some people.