The middle-class may be the foundation upon which the United States was built, but it's nonetheless slowly disappearing.

According to a Pew Research Center report from December 2015, the aggregate number of middle-class households (120.8 million) is now lower than the combined total of lower- and upper-income households combined (121.3 million). Mind you, in 1971 there were nearly 29 million more middle-class households than lower- and upper-income classes combined.

Furthermore, a report from Credit Suisse in 2015 appears to confirm Pew's finding, with the U.S. ranking dead last among 21 countries in terms of the share of wealth held by the middle class. Within the U.S., the middle class held less than 20% of total wealth, compared to 50% in Netherlands, 49% in Japan, and 39% in Canada.

A man on a couch with two children, one looking at a tablet and another looking at a smartphone

Image source: Getty Images.

There are a number of reasons why the middle class has struggled over the past couple of decades and seen their share of U.S. wealth evaporate. Some of the factors we've previously discussed include stagnant wage growth, debt, and poor saving habits. This last point is especially telling. The St. Louis Federal Reserve's March reading for personal savings rate is less than half of what it was 50 years ago -- just 5.9% -- and it's far less than the recommended 10% to 15% that most financial advisors recommend workers save for their retirement.

A survey on stock ownership

But what if these factors (stagnate wage growth, high debt, and poor saving habits) aren't what doomed the middle class? What if, in fact, a lack of trust in the stock market is to blame?

According to a recently released survey from national pollster Gallup, total U.S. stock ownership, either individually in a portfolio, in an IRA, or through an employer-sponsored 401(k) retirement plan, has dropped by 8 percentage points between 2001-2008 and 2009-2017 to 54% from 62% for U.S. adults. Another way of looking at this data is that despite the S&P 500 (SNPINDEX:^GSPC) falling more than 55% from its peak in 2007 to trough in March 2009, and rising by more than 260% since March 2009, stock ownership as a whole has declined.

Gallup notes that only two types of individuals actually increased their stock ownership since 2008: those over the age of 65 (up 1% to 54%), and those households with annual incomes of $100,000 or more (up 1% to 89%). You'll note there's a very wide gap of 35 percentage points in terms of stock ownership between the average American (54%) and the upper-income individual (89%).

An investor pressing the "sell" button on a digital screen.

Image source: Getty Images.

At the other end of the spectrum, there was a very noticeable decline in stock ownership among households in the $30,000-$74,999 range (67% in 2008 to 54% in 2017) and in the $75,000-$99,999 range (85% to 75% over the same time span), albeit to a smaller degree.

What Gallup's findings appear to imply is that the middle class hasn't fully participated in the stock market's eight-year long rebound, while the wealthy have taken full advantage by staying invested. This could partially explain the widening of the wealth gap that we've witnessed between the middle class and the rich over the past decade.

Buying high-quality stocks over the long term is a good bet for success

Time and again the data show that staying invested over the long term -- even through major bear markets -- and buying stocks at regular intervals, regardless of whether the market is at a new high or well off its highs, is the most effective way to generate wealth.

Though stock market corrections happen somewhat often, they're not in any way predictable. Yardeni Research has found 35 such stock market corrections in the S&P 500 since 1950 of at least 10%, when rounded to the nearest whole number. However, a majority of these corrections were wiped out by a rally within weeks or months, and every single last one of the 35 previous corrections in the S&P 500 has been firmly left in the rearview mirror. Stock valuations tend to head higher over the long run, which means middle-class households should remain invested, too.

A middle-class couple looking for stocks to buy in a financial newspaper.

Image source: Getty Images.

An analysis conducted by J.P. Morgan Asset Management last year really laid out the case for staying invested during volatile markets. The investment firm analyzed returns on the S&P 500 between Jan. 3, 1995 and Dec. 31, 2014, and found that if an investor bought and held the S&P 500 over this entire 20-year period, he or she would have gained 555%, or 9.9% per year. Mind you, this 555% gain includes both the dot-com bubble bursting and the Great Recession, when the S&P 500 experienced respective losses of 50% and 57%.

By comparison, if an investor wound up missing just 10 of the best trading days over this more than 5,000-day trading period, he or she would have seen their gains more than halved. Miss a little more than 30 of the best trading days, and you'd have lost money.

And don't think you can time the market, either. Quite a few of the top-performing days for the S&P 500 were within two weeks of its worst-performing days over this 20-year period. 

If the middle class in America wants to recapture its share of wealth and retire comfortably, it'll need to get over its distrust of Wall Street and start investing in stocks. 

The middle class will also need to start saving more. A mere third of Americans, according to a 2013 poll from Gallup, are keeping a household budget. Complimenting a better saving habits with a long-term buy-and-hold mentality would be a win-win for investors. Most budgeting software can be found online, making it easier than ever for Americans to formulate a budget that can put more in their pocket, and their portfolios, each month. 

Sean Williams has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a disclosure policy.