It's important to remember that this is putting all of your eggs in one basket to a certain extent though.
Your income, your 401k match, and your ESPP are all tied to your employer, so as long as things are good, ESPPs can be a great way to make easy money, but if things take a stark downturn, you can find yourself with ESPP you lost money on, a slouching 401k, and no job. The chances of that happening are fairly low, but still something that makes me a little uncomfortable about ESPPs.
Obviously your advice to max our 401k/IRA contributions first should mitigate a lot of this, but I think it's important to mention the risk too since there's a certain temptation for younger engineers who think it sounds like easy money and don't realize the full implications of it.