The Robinhood trading frenzy earlier this year likely had new investors believing that to make money in the stock market you have to jump on stocks that are hot and bail just as quickly to cement your profits before moving on to the next meme stock.

Obviously that's gambling, not investing. The real value comes from holding on to your stocks for years -- decades is best -- and watching as their businesses grow and appreciate. It's not as exciting as taking a flier on a WallStreetBets stock, but buying good companies that still possess long-term potential and never selling is how you really accumulate wealth. That's why I plan to hold these two stocks forever.

Piggy bank wrapped in chain and padlock

Image source: Getty Images.

1. Genuine Parts

You may know aftermarket auto parts retailer Genuine Parts (GPC -2.99%) better as the owner of NAPA Auto Parts stores. It has a long history of outperformance with sales growing in 87 of the last 93 years (last year being one of those anomalies where revenue dropped, though for obvious reasons). 

Still, the long-term outlook remains not only positive, but quite upbeat. The auto industry was also hurt by the pandemic, which means people were buying new cars but keeping their rust buckets on the road longer and they'll need parts to keep them running. 

Worse for new car dealers, the computer chip shortage that's plaguing numerous industries, and the auto industry in particular, has manufacturers lowering expectations for production for the coming year. Ford just issued a fairly robust earnings report but its guidance that it expects production to fall by 1.1 million vehicles this year put a damper on its stock.

Again, that means car owners will need to keep their current vehicles in good shape, so Genuine Parts will still be needed. And it's that constant ebb and flow of demand for people to fix their cars that has sustained the auto parts retailer over the past century, and will likely keep it motoring for at least another 100 years into the future. (Even if we're driving flying cars by then, owners will still need the parts to repair them.)

One of the most attractive things about Genuine Parts, however, is its record of dividend payments. The company has paid investors a cash dividend every year since going public in 1928, and its payout this year of $3.26 per share represents the 65th consecutive year it increased the dividend, which currently yields 2.6% annually.

2. Leggett & Platt

Robinhood's meme stock crowd would probably never pile into Leggett & Platt (LEG -2.29%) because making innerspring coils for mattresses and sofas is not the sort of sexy play that pops up in internet chatrooms. Yet this study business has been around since 1883 and keeps chugging along largely out of view of the masses, but producing outsized returns for those in the know.

Over the last 40 years, Leggett & Platt has returned almost 10,600% for investors, compared to nearly 3,800% by the S&P 500, meaning $10,000 invested in this oh-so-boring company at the start of 1980 would be worth well over $1 million today (the stock index would have generated $387,000 in the same time frame).

LEG Chart
Data by YCharts.

Leggett & Platt has done that by sticking to its knitting, or rather its steel coils. It rarely extends far outside those operations, which account for half of its annual revenue, and when it does it tends to be in closely related fields.

Beyond mattresses and sofas, the company supplies the auto and aerospace industries, furniture manufacturers, and flooring and textile businesses with products that are in some fashion closely related to its core components, such as mechanical and lumbar support for seats; steel mechanisms and motion hardware for chairs; and synthetic fabrics for ground stabilization, drainage protection, erosion, and weed control.

Yet like Genuine Parts, Leggett & Platt is also a longtime dividend payer, and it notes that maintaining its inclusion in the list of Dividend Aristocrat stocks, or those companies that have increased their shareholder payout for 25 consecutive years or more, is a high priority for the company.

The dividend actually ranks second on its list of priorities after investing in organic growth, and with 49 straight years of dividend hikes, Leggett & Platt is poised to become a Dividend King, or a company with 50 or more years of raising its payout (a much smaller elite group of stocks, of which Genuine Parts is also a member). 

Because it is a conservatively run business in a fairly conservative industry, there's little reason why it shouldn't be able to keep going as it has for many years to come, and that's why Leggett & Platt will remain in my portfolio forever.