So, which X would you start with?
https://ethics.acm.org/code-of-ethics/
In practice that means I...
* refuse to work on adtech/corporate social media
* refuse to do work for the military or with military applications
* refuse to do work for law enforcement or work that might prove useful to law enforcement
Is this meant as a universal refusal or does it apply just to US law enforcement?
My point is that law enforcement is generally regarded as necessary to the proper functioning of society and while some of those involved in it might be bad people the concept itself is not.
I'll change my mind when driving while black is no longer punishable by summary execution in at least half of the US.
I think you are conflating two related but distinct matters: ethics and the law. It is perfectly possibly to behave unethically while obeying the letter of the law and to break the law while behaving ethically.