I'm constantly reminded that we, as programmers, have excellent opportunities in both fields: we can both shoot for the stars in a startup, and have a comfortable fallback in enterprise. I can't think of many other professions with this great a degree of both opportunity and security.
The guy that can negotiate a huge robot sales contract and use that to do a leveraged buyout that puts him in the CEO chair is at the top of the chain. (what a lovely reddit style chain of comments ; -)
How many people lay out CPU circuits at Intel any more? Computer (using a CPU) does that.
How many people physically make chips at a foundry? "Robots" do that.
There are a lot of tasks in designing and building computers that can only be done with computers these days. Sure, someone runs them, and someone does some significant level of design, but the final designs and products are no longer possible without the very products that those efforts produce.
I agree with both of your examples, but the post being responded to involved the replacement of programmers. Until we can come up with a conveniently numeric way of specifying, analyzing, and solving computational problems in the general case, I don't think I need to fear being replaced.