Programming involves a lot of judgment. Enslaving programmers would lead to the programmers programming very inefficiently on purpose, and there would be no way for the slaveowner to punish only the programmers guilty of slacking off. The slaveowner could try to punish all programmers who don't produce much, but the slaveowner can't tell the difference between a slacking programmer and a programmer just given a difficult or inappropriate job, so in the long run that wouldn't work.
Also, the mental activity involved in programming doesn't work well if the programmer is psychologically stressed by other things, and enslavement and blackmail tends to cause such stress.
Yes, Viliam made an extremely poor example. No, this doesn't affect his main point, because he could have made a better example instead. Sweatshops do exist and yet AFAIK nobody's ever proposed to ban selling clothes for money.
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one. (Immediately before; refresh the list-of-threads page before posting.)
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.