Let's get one thing out of the way: Your employer probably isn't the next Enron.

Bad experiences make a huge impression on investors. A generation of investors who went through the Great Depression convinced themselves that buying stocks was basically the same as betting at the track. Talk to old failed day-traders from the Internet boom era and you'll hear stories about how they'll never do it again.

The same attitude surrounds buying shares of your employer's stock in your 401(k). The very thought of buying company stock brings up images of Enron and WorldCom employees cleaning out their desks and selling paperweights with corporate logos on eBay as macabre reminders of the financial devastation that thousands suffered. Waves of litigation ensued, snaring not just failed businesses but also companies like Boeing (NYSE:BA), Tribune Company (NYSE:TRB), Dynegy (NYSE:DYN), and EDS (NYSE:EDS).

Even though some employees lost everything by owning company stock doesn't mean you should avoid it entirely. Here's how to do it right.

1. Don't overdo it.
The employees who lost the most in the Enron and WorldCom debacles took on too much risk in their retirement plans. Their plan balances represented the bulk of their life savings, so by investing a majority of their assets in their employer's stock, they gambled their financial futures on the success of their company.

By taking less risk you can still benefit from your employer's growth. Many plans still allow employees to invest half or more of their 401(k) money on employer stock, but you don't have to choose the maximum. A smaller fraction -- between 10%-20% -- ensures that you won't lose everything if something bad happens.

2. Be objective.
When it comes to evaluating your employer's business prospects, it's difficult to be entirely rational. After all, you already rely on your employer's success for your earnings, and you work hard to contribute to them. Although that's a positive for your career, it's not the best way to look at a stock investment.

On the other hand, if you keep tabs on your competitors, look closely at conditions across your employer's industry, and can be critical of your company's shortcomings, then you can probably have an objective opinion about your employer's stock. That unbiased view will allow you to make decisions about your employer stock without being colored by issues related to your particular job.

3. Consider your entire portfolio.
Because retirement plan money is separate from your other investments, you may think of it as an independent account. Tax-deferral benefits do make certain strategies more appropriate for retirement accounts, but you should still think of your retirement plan as just one component of your overall portfolio. By including all your assets in your planning, you might make decisions differently than if you're looking only at your retirement account.

For instance, investing 100% of your retirement plan money in your employer's stock is generally too risky. But if you have $10,000 in your retirement plan and $1 million in IRAs and other investment accounts, then electing to put all your retirement contributions toward employer stock makes more sense. It may be your entire retirement plan, but it represents only 1% of your total assets.

The big picture
If you have a chance to invest in your employer's stock, don't automatically dismiss it. Big mistakes others have made shouldn't keep you from taking advantage of a potentially lucrative investment. Just be sure to think of it as you would any other investment, and be careful of work-related factors that can cloud your judgment about your employer and its financial prospects.

Related articles:

For more on how to handle your retirement investments, sign up for a complimentary one-month guest pass to Rule Your Retirement. You'll have full access to today's issue as well as dozens of back issues covering all sorts of retirement topics. Let Rule Your Retirement help you plan your retirement today.

Fool contributor Dan Caplinger still owns some stock in a previous employer, but he doesn't own shares of the companies mentioned in this article. The Fool's disclosure policy won't quit on you.