Arguably software engineering compared to engineering in a broader sense has a bigger issue with the “we did this because we could, not because we should” attitude.
I feel like a “formalised ethical code” would result in more clever approaches of avoiding it. We don’t need to look far to find the examples (looking at ya ad tech)