First, the obvious way: required licensing is likely to be the result of a disaster (or repeated disasters); by encouraging ethical behavior, we reduce the risk of such a disaster, thereby reducing the risk of such regulations; and even moreso by encouraging people to actually think about ethics.
Certainly, representation is a problem. It limits the possible effect of any code, after all, it can only influence those who read it. As for teeth, I can think of fairly few instances where “revocation of licence” (or expulsion) would make sense. Most of these are clear and blatant violations, things like writing software that lies to regulators. For the most part, these things imply such a disregard for ethical behavior that even the simplest instruments should be sufficient for enforcement, as there is no real defence for such behavior.
To be frank, most of the problems that we need to solve, and a code of ethics might approach aren’t going to involve any kind of enforcement; the ethical mistakes made are far too minor for that. Instead, our best hope to deal with these kinds of problems is to encourage people to actually think, to consider the broader impacts of their actions. The biggest problem with a code that provides clear and obvious rules is that it encourages obedience over thought. And if we are to fix our current problems, we need software developers to think about the ethics of their work.