Source: David Mellis, via Flickr.

Your 401(k) just might be the best benefit you get at work. Through smart, consistent investing throughout your career, your 401(k) offers you an excellent chance to retire a millionaire. On top of that, your 401(k) may give you the opportunity to instantly double your money thanks to the tax deduction available in Traditional 401(k) plans and the potential for an employer match.

As awesome as the benefits from your 401(k) can be, your plan may have a massive risk embedded in it. That risk, almost ironically, comes from the very company kind enough to offer you that 401(k) -- your employer. The risk comes in the form of company stock -- a part ownership stake in the business that also hands you your paycheck.

What's wrong with owning your company's stock?
While much good can come from the culture of ownership enabled by employees owning shares of the company's stock, the risk to you is significant if things go wrong within the company. Not only can your job be at risk if things go sour, but your life savings could be on the line, too, if you've got a significant chunk of it in the company's stock.

Remember Enron? Before that company collapsed amid its fraudulent energy trading scheme, around 62% of the assets in its 401(k) plan were tied up in company stock. Imagine being one of the employees there who wasn't part of the scam and waking up one morning only to find out that:

  • You lost your job
  • You lost your nest egg
  • You not only have to start over, but you have to do so with the massive stain on your resume of having worked at Enron

Think it can't happen to your company? It may seem hard to believe, but not long before it collapsed, Enron was named one of the best companies to work for in America. More generally and recently, there were 28,319 corporate bankruptcy filings in the U.S. in the 12 months ending September 30, 2014. Extend that rate over a 40-year career, and over one million U.S. corporate bankruptcies over your working lifetime would not be out of the realm of possibility.

Your life, your career, your investments
When all is said and done, you've only got one career -- even if it spans multiple employers. Throughout your career, you trade human capital (your time, brainpower, and effort) for financial capital (your paycheck). While you're likely paid less well in the early stages of your career than you will be later in that career, the early money you earn has an incredible advantage over the money you earn later: the ability to compound in your investments for decades longer before you need it.

That difference can be substantial. For a younger, less-well-compensated employee, a single $1,000 investment compounded at 10% per year for 40 years can be worth over $45,000. For an older, more experienced one, a larger $10,000 investment compounded at 10% per year for 10 years would be worth closer to $26,000. 

That ability to compound a little bit for longer periods of time works to your advantage if you're young, but it makes rebuilding your nest egg far more difficult as you get older. And that's a key reason why over-investing in your employer's stock is so very risky. If the company struggles and you lose both your job and your nest egg, you don't have as much time to make it back.

Can you fit as both an employee and an owner?
Many companies will hand their employees their 401(k) match in the form of company stock. Some will even let you buy it on your own in your 401(k). They all need to have rules allowing you to diversify out of company stock. You should understand those rules and be willing to trim back your exposure to your company's stock if it gets excessive -- which is likely to happen if your company matches your contribution in the form of its shares.

That said, as an employee, you probably know more about the company than a typical external investor would be likely to figure out. If you like the company's prospects, financials, and valuation, it may very well be OK to own a reasonable position in its shares as part of your overall portfolio. Just remember to ask yourself what would happen to your family and your retirement if the company joined those filing bankruptcy. If your answer comes back "we'd never retire," then it's a sign you likely have too many eggs in that single basket.

Despite making it way too easy to own too much of your employer's stock, your 401(k) remains a great tool to build the nest egg that will get you through your retirement. Take advantage of it -- but just be careful to spread your eggs appropriately.

Chuck Saletta has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.