Sorry for a gloomy vision but:
1) the 'corruption' of the modern software business is driven by business and not technical leaders;
2) even vocal and principled engineers have kids to feed and even those without such commitments don't leave free massages in the office easily;
Those of us working in larger organisations are just that when it comes to fighting for principles - hopelessly lonely.
That said, and with the caveat that I'm aware of the vast amounts of issues around this, I will simply say that others have thought about this problem before us. http://en.wikipedia.org/wiki/Portal:Organized_Labour
(edited: see rest of thread)
This was their original business model. Previous to that they had none and were pretty much considered doomed.
Software is eating the world, good and bad, and our role as a profession is to help make the transition of the entire society, altruistic and greedy, charitable and fraudulent, to the highly automated mode of being. After this, it's everyone's individual karma vector's job to guide us in more or less ethical way of conducting ourself professionally.
Which gets to your second paragraph which, while I really like how you've worded it, I disagree in the general case. Yes, we should build technology that is unbiased and pliable. But I think the example of TCP/IP or HTTPS illustrate that that is too simplistic. We are responsible for building technology that answers to its users, and highlights or removes the ability for users to be abused when interacting with it.
I mean, yes, but... at the end of the day this is a capitalist society, and if you want to build, say, Google, you do not get your funding by convincing a central planner that this will benefit people, you get your funding by convincing an investor that you can make them rich.
The question is how can we preserve the best interests of our users while creating profitable businesses, which is a hard problem that I do not know the solution to.
From a purely professional standpoint, we should've long ago settled on a few languages to do our tasks, and focused on exploring how to write and manage decade-long projects in those cases, or at least how to rapidly develop and shift codebases to meet the new year's business needs. We've done neither consistently.
We should've come up with some kind of licensing and liability system for work done, similar to the Professional Engineering license that is required for building a bridge or skyscraper. This in turn requires that we should've come up with a common nomenclature for solving business problems--we tried this with design patterns, but in a further fit of snowflakeism this approach was unfairly derided and made fun of by our entire industry, mostly because we let it get out of hand.
We should've come up with some kind of way of specifying and defining projects, so that we can give an honest quote ahead of time and give clients a way of explaining what they want built and removing the "oh but I guess that's not what I wanted" entitlement many seem to have because they (rightly) don't respect our professional expertise.
We should've long ago bridged the gap between the academic/theoretical practice of computer science and the professional issues of software engineering and the performance issues of computer engineering, but instead we decided that internships and coops (though not always by that name) were the "real way" to learn about software development.
We should've done a great many things, but we didn't, and now? Now it's probably too late to turn things back. So, in the mean time, let's make hay while the sun shines, and pass the buck to the next generation of poor hapless bastards.
~
Oh, and as for the users? I've got a rather unpopular opinion on that:
They've accepted, encouraged, and rewarded at every term their own enslavement and disrespect.
They've continually decided to ignore how the magic boxes work, decided to embrace the shiny over the functional, and in general cast us as the Morlocks and them as the Eloi.
So, we might as well exploit them---they neither notice nor want more.
EDIT:
And the downvotes, as expected.
Until we build software like we build bridges, we shouldn't faff about with professionalism. We need to stop coming up with language-of-the-quarters and code spikes and other stuff. And yes, that means that things aren't magic and fun and whatever, and that means that things aren't interesting, and that means that maybe we don't use the exact best tool for the job, but that's practical engineering. It's boring as hell but dependable and conservative.
Until our users realize that "hey, maybe I shouldn't spew all of my personal data to complete randos on the internets", they don't deserve to be treated as anything other than a monetizable resource. Until app users are willing to pay more than a buck for their mobile app, we should avoid helping them and instead maximize our revenue. They don't respect us.
Look, there are edge cases in certain types of bespoke software work, certain good clients and customers that are informed and intelligent, but the most of the sixth of the world that is on, say, Facebook, can neither imagine nor articulate the freedoms they forfeit (for themselves and others!) every day.