If you're a software engineer then you are most likely in the top 1% of earners globally so why do you want to spite others trying to start their career, just so you can earn even more?
I'm not sure about that. The thing about doctors is that people don't decide not to get sick. With programming, if regulation of the industry dampens innovation, it might reduce the demand for software, and consequently, depress wages.
Under the current paradigm where wealth is steadily and increasingly being consolidated to the owners of automation, I don't think demand will decrease until the singularity, which is still a long way off, if even possible given our current resource consumption.