This article originally appeared in the Motley Fool.

Pensions are a dying perk: Just 4% of workers in the private sector enjoy this particular retirement benefit compared to about 60% in the early 1980s. Many employers instead offer access to a 401(k) plan, leaving it up to workers to save for their own retirement, though perhaps with a bit of help in the form of matching contributions. But believe it or not, a 401(k) may actually be a better source of retirement funding than a pension would be. Just consider the following facts about your 401(k).

1. You Set The Contribution Schedule

With a 401(k), you can contribute as much of your paycheck as you'd like (although you'll need to be careful not to exceed the  annual contribution limit  for 401(k)s  -- in 2018, that's $18,500 for workers under 50 and $24,500 for those aged 50 and up). There are several different strategies you can use to work out how much you'll need to contribute in order to fully fund your retirement; you can pick the strategy that works best for you and set your contribution level accordingly.

With a pension, you're leaving the contribution decisions to your employer. It would be nice to think that all employers are responsible enough to amply fund their pension accounts, but in reality, pensions regularly fail as a result of underfunding. In fact, the Pension Benefit Guaranty Corporation estimates that by the end of 2013, nonunion private pension plans were underfunded to the tune of more than $700 billion.

2. You Make The Investment Decisions

Chronic underfunding gets a lot worse when it's paired with bad investment decisions, and history shows that you can't assume the person managing your pension will choose its investments wisely. For example, between 2010 and 2015, pension plans produced average annual returns of around 9.8%. During that same period, the S&P 500 produced an average annual return of 13.44%. In other words, the average pension would have produced better returns if the pension manager had just dumped it all into an S&P 500 index fund.

One reason that pension plans have fallen behind the curve is that many pension managers have become addicted to alternative investments, particularly hedge funds. Unfortunately, these investments have been hugely underperforming the stock market since 2010, in part because hedge funds charge relatively high fees that eat into the funds' returns. Yet 31% of pension plans have at least 30% of their assets in alternative investments.

It's highly unlikely that your 401(k) account gives you a hedge fund investment option, but even if it did, you'd be advised to shun it. A quick way to figure out the best asset allocation for your retirement account is to subtract your age from 110 and put that percentage of your money into stocks, with the remainder in bonds. Stocks provide great average long-term returns; bonds give you stability and a source of fixed income, which becomes more important as you approach retirement age.

3. Your Retirement Money Is Portable

Your pension benefits are based on your salary and how long you stayed with the company. Pensions typically use either cliff vesting or graded vesting to determine your access to your benefits (vesting refers to when you get ownership of those benefits). With cliff vesting, after you stay with the company a certain length of time (typically five years), you've earned 100% access to your pension benefits. With graded vesting, after you've been with the company for three years, you start gaining access to pension benefits at a rate of 20% per year. By the end of your seventh year, you'll be 100% vested in the pension.

Unfortunately, job-hopping is the norm these days, and few people stay with the same employer for more than three years, let alone seven. Worse, even if you stay long enough to fully vest, your pension benefits will be based on your earnings from that employer -- and if you stay only a few years, the resulting benefits will be pretty minimal.

As for 401(k)s, they are also subject to vesting, but in a different way. The money you put into your 401(k) is always 100% vested; no matter when you quit your job, that money belongs to you. Your employer's matching contributions, however, will vest on a schedule similar to that of a pension.

4. If The Company Fails, Your Money Is Safe

Remember Enron? Its spectacular crash not only wiped out thousands of jobs, but also destroyed the company's $2 billion in pension plans. And it wasn't just the company's employees who lost their retirement benefits; many former employees who had already retired found themselves suddenly deprived of their major source of income.

Even if your employer is in perfect financial health today, there's no predicting how it will be doing 20, 30, or 40 years down the line. The Pension Benefit Guaranty Corporation insures private pensions and will step in if your pension fails, but the agency only has so much money to hand out. If your employer goes bankrupt and its pension fails, there's a good chance you won't get your full benefits -- and in some cases, you may not get a penny.

On the other hand, employers can't touch your 401(k) money. Those funds are in the hands of a 401(k) trustee precisely so that they'll be safe if something bad happens. Even if your employer is the next Enron, you may lose your job, but your 401(k) funds will be just fine.

In theory, pensions are the ultimate retirement savings tool. In practice, they have many pitfalls -- and as a result, they present an awful risk to anyone counting on those pensions for retirement income. So instead of bemoaning the fact that your company doesn't offer a pension, be thankful you have a 401(k) instead.

download (6) Pension vs. 401K Photo: Reuters

The Motley Fool has a disclosure policy.