My own personal way to handle this is to always work in situations in which the goal of the programming is something I want to accomplish. There's still unrealistic deadlines and pointy haired bosses, but I use my desire to accomplish the goal as the motivator to get me through the B.S. I've turned down promotions and job offers a number of times because I am picky about what I do. Hasn't been great for my finances, but hey money isn't everything.
If you want to stick with programming, one thing you might consider is working in an academic environment - universities often have a different attitude towards time and personell and a greater recognition that people need to set their own pace (though of course that varies from dept. to dept.).