Absolutely this. Society, and the industry itself views software engineers still as highly paid blue collar workers doing menial plumbing tasks. In reality they are writing the words on the pages of social engineering. It can be a washing machine firmware programmed to ignore circumstances that could save shelf live of the device, networking firmware giving access to manufacturer that could be backdoored, game development where other parts of the software siphon data to advertisers, all realms of software has the potential to be a tool of adversaries.
While this potential is there for every paid job ever, software works invisibly, it's untraceable and ununderstandeable for the general population.
The profession would gain a lot from something like a code of conduct that everyone could make an oath to.
There are regulations we should adopt, but what GP proposed is a bottom-up rather than a top-down approach like regulation. For instance, we could, as software professionals, take an oath not to write malware or spyware ("malware with a budget"), and at the same time, take an oath to invest time in the security of a piece of software.
If a civil engineer is approached to design a bridge in an unsafe manner, it is the expectation of society that they will refuse. If that bridge collapses, they're expected to take responsibility and to participate in an investigation to ensure this never happens again.
We should be thinking along these lines. I used to think I was just a hacker and that software engineer was just a job title. After reading this series of blog posts [1], my eyes were opened. Once I accepted I was some kind of engineer, I asked myself what that meant. What I realized was, an engineer has a responsibility to society, because they build the context society inhabits.
That's what separates them from a hacker or tinkerer, exploring in their garage for the joy of it. In your garage you can be an artist, accountable to no one. When you build the systems people rely on every day - you aren't a hacker anymore.
While this potential is there for every paid job ever, software works invisibly, it's untraceable and ununderstandeable for the general population.
The profession would gain a lot from something like a code of conduct that everyone could make an oath to.