While the ESPP sounds like a great idea when the company is doing well, I think it's dangerous to put all your eggs in one basket. Yes, people at Microsoft and Apple have done extremely well when their stocks soared, but other companies have gone bankrupt and stocks plummeted. This leaves the people on the verge of retirement flat out of luck. I personally know of at least two people who lost 50-75& of their retirement savings that were invested in their bankrupt company's stocks..
Younger people can afford to take more risks, and might benefit from purchasing their company stock, but those who are looking for somewhat safer investments would be better off with a 401K with investments diversified among stocks and bonds.