Many people think of long-term investing as buying and holding a stock for several years instead of succumbing to the psychological temptation of short-term trades. However, holding a stock for decades instead of years could create even bigger generational gains that you could potentially pass on to your children and grandchildren.

For example, the S&P 500 generated a total return of 102% over the past five years. But over the past 10 years it delivered a total return of 209%. If we stretch out that chart to two decades, its total return jumps to 528%.

Buying and holding a stock for decades can be a hit and miss strategy, since many companies simply aren't built to last that long. Nevertheless, I believe these three stocks (which I personally own) check all the right boxes as "buy and forget" investments: Amazon (AMZN 3.43%), MercadoLibre (MELI 3.09%), and LVMH (LVMUY 0.82%).

A father puts coins in a piggy bank with his two children.

Image source: Getty Images.

1. Amazon

Amazon is the world's largest e-commerce and cloud infrastructure company. Its sales of ads across its own e-commerce marketplaces, websites, and streaming media platforms also make it one of the world's top advertising companies.

Over the past 20 years, Amazon's stock has risen 5,470%. That growth was initially driven by the expansion of its e-commerce platform, but its cloud platform Amazon Web Services (AWS) also grew over the past decade as its higher-margin revenue turned it into the company's core profit engine. The expansion of AWS and its higher-margin advertising business should also offset the lower margins of its e-commerce marketplace and brick-and-mortar stores for the foreseeable future.

With a market capitalization of $1.5 trillion, Amazon probably won't replicate those massive gains over the next 20 years. It also faces a lot of competition in the e-commerce market from smaller challengers like PDD's Temu and Shein, while Microsoft remains a formidable foe in the cloud infrastructure market.

Despite all those challenges, I believe Amazon remains a great stock to buy and hold for the next few decades. It takes scale to survive and thrive in the e-commerce and cloud markets over the long run, and Amazon continues to squeeze profits from both businesses as many of its smaller competitors burn out in this challenging market.

2. MercadoLibre

MercadoLibre is the largest e-commerce and digital payments company in Latin America. It generates most of its revenue from Brazil, Mexico, and Argentina.

The company went public in 2007, and its stock has rallied about 8,340% from its IPO price. That growth was driven by the expansion of its first-party logistics network -- which crossed some tough terrain across Latin America -- as well as rising internet penetration rates and income levels. That early-mover's advantage prevented Amazon, Sea's Shopee, and other overseas challengers from gaining meaningful footholds across the region.

MercadoLibre already served 120 million unique active users across its e-commerce and fintech platforms in its latest quarter, but it has plenty of room to grow. According to Mordor Intelligence, the Latin American e-commerce market could expand at a compound annual growth rate (CAGR) of 19% from 2023 to 2028.

With a market cap of $77 billion, MercadoLibre is still a lot smaller than Amazon. It's also generated consistent profits in 2021 and 2022 as economies of scale finally kicked in and diluted its logistics and payment processing costs. Analysts expect those profits to continue rising, so its business model is clearly built to last for decades and drive its stock even higher.

3. LVMH

LVMH is the world's largest high-end luxury company. Its 75 well-known brands include Louis Vuitton, Dior, Loewe, Fendi, Tiffany & Co., Bulgari, and Sephora, which all generally hold up well during both economic recessions and expansions.

Unlike mid-range luxury brands, which rely heavily on middle class shoppers, LVMH targets the most affluent customers who are well-insulated from the macro headwinds. It's broadly diversified across a wide range of luxury markets (wines and spirits, fashion and leather, perfumes and cosmetics, watches and jewelry, and specialty retail) and countries. Its sales in China and other emerging markets have notably been booming over the past several years.

LVMH's U.S.-listed OTC shares have delivered a total return of more than 410% over the past 10 years and boosted its market cap to nearly $400 billion. It achieved that impressive growth even as the global economy was rocked by recessions, geopolitical conflicts, and the COVID-19 pandemic, and that resilience suggests it will remain an evergreen investment for decades to come as it gradually consolidates a large portion of the high-end luxury market.