Bonhoeffer is fine.
If you really want to instill a sense of ethics that will avoid these issues though you probably need to exit mainstream white philosophy. While fringe white Europeans like Bonhoeffer started a dialogue about how to avoid minority rule, fascism, and the terrors of dehumanization, the honest truth is that if you want to find an ethical system that utterly avoids these trappings you have to read ethics from oppressed people groups.
If you tolerate Christian thought: Doing Christian Ethics from the Margins by Miguel de la Torre is an introductory book on the subject. (Note: It says de la Torre is a professor at Hope College. This is not true. He was fired for an article mocking James Dobson and defending the LGBT community.)
If you like Christian thought or want to know if there are decent Christians anywhere: A Theology of Liberation by Gustavo Gutierrez. (Note: Gutierrez is an absolute genius, but that makes this dense. He will assume you have a working knowledge of international development theories, and then he will explain why he thinks they are all garbage. Be prepared for a couple chapters of this book to require you to spend significant time on google if you don't know anything about international development.)
If you don't want to read Christians: The Ethics of Opting Out is about the way that Queer Theory challenges the neoliberal concept of an ideal life and revolutionizes ethical approaches.
There's also Known for My Work: African American Ethics from Slavery to Freedom by Lynda Morgan, which talks about how the lived experiences of African Americans shaped their moral compass, ethical systems, communal, religious, political, and labor organizations in ways that help them challenge white supremacy.
You quickly find yourself reading unknown authors. People of color and queer people that write about ethics don't often get much attention. Probably because what they write about would require most Western societies to fundamentally change the way that we think about ethics and structure our systems. Then again, if you want to build systems that won't ever allow a party like the GOP to appear again you probably have to fundamentally change those systems.
Other people can add if they want, or criticize the books I put here. Honestly even if you don't like Christians I'd say to read de la Torre's book and just try to learn about the approach he's advocating for even if you want to ignore the rest of the text. It's really the only introductory book on the subject that I'm aware of.