Get-rich-quick schemes never work. I mean, you could get lucky and hit the jackpot with some ridiculous penny stock or hitherto-unknown cryptocurrency, but you might as well just buy a lottery ticket instead. That's gambling, not investing.

Buying top-quality stocks and holding them for several decades, on the other hand, can give you life-changing returns. All you need is a handful of companies built for truly long-term success and a little bit of patience. OK, a lot of patience. But let me assure you that the wealth-building gains are worth it.

A $10,000 investment in the stock market, as a whole, as tracked by the S&P 500 market index over 50 years, would have grown into $338,000 today. Direct ownership of market-beating stocks unlocks even stronger gains in the long run. For example, a $10,000 investment in consumer goods giant Procter & Gamble 50 years ago would be worth $393,000 today. Soft drink veteran PepsiCo turned the same investment into a spine-tingling $814,000.

Here are two stocks that should beat the market over the next five decades, as Pepsi and P&G did in the last half-century.

An hourglass stands next to a few piles of coins under a spotlight in an otherwise dark scene.

Image source: Getty Images.

A-B-C, as easy as 1-2-3

Alphabet (GOOG -1.96%) (GOOGL -1.97%), the company formerly known as Google, is built for long-term success. If I had to liquidate my entire portfolio and pick only one stock to replace it all, this would be it. To be specific, I'd pick the Class A voting stock (GOOGL) out of an unstoppable urge to make my minuscule voice heard as a shareholder, but voteless Class C shares would be just as good from a pure moneymaking perspective.

Whichever share class you pick, Alphabet will remain a healthy, growing business in 50 years. Google might be a long-forgotten chapter in Alphabet's past by then, but other business ideas will have taken the internet search-engine's place.

The company is willing and able to adapt as the business world changes over time. That aspiration goes far beyond managing Android, the world's largest mobile computing platform. So far, Alphabet's long-term growth ideas include self-driving cars, drone delivery services, artificial intelligence, and balloon-based wireless broadband services. Alphabet's medical-science projects include robotic surgery, bioelectronic medicines, and "tackling aging" in humans.

This is exactly the kind of forward-thinking flexibility I want to see in my long-term investment vehicles. The world will change dramatically in the next 50 years, and nobody knows exactly what we'll get. But Alphabet will bob and weave along with the evolving market, often leading the way while following other secular trends. Investors who pick up a few shares today will see market-stomping returns for many decades to come.

A red Netflix logo on a white background with the tagline See What's Next in black.

Image source: Netflix.

See what's next

Netflix (NFLX 1.74%) might seem like an odd choice for a discussion about long-term buy and hold opportunities. The digital video-streaming veteran is more of an explosive growth stock today, having grown its revenues at an annual clip of 30% over the last five years. The stock trades at a nosebleed-inducing 110 times trailing earnings, Netflix expects free cash flows to stay negative for a couple more years, and the video-streaming sector is packed with fresh competition from winning names like Walt Disney and Comcast.

The stock is surely headed toward a dramatic plunge in the near future, right? That's hardly a good way to deliver shareholder value for the long term.

So here's the deal. If Netflix wanted to impress traditional value investors with some positive cash flows, it could do so right away. Just tap the brakes on content-production projects, pull back the marketing budget by a few percent, and take advantage of the Netflix service's proven pricing power by raising subscription fees little by little. Easy peasy. The cash will start to roll in, starting in the next quarterly report -- at the expense of dramatically lower subscriber additions and top-line revenue growth. 

That day will come, but Netflix is still focused on growing its subscriber base as quickly as possible while building a valuable catalog of high-quality Netflix Originals. Free cash flows will move closer to breakeven over the next couple of years, followed by a long period of strong cash generation. Meanwhile, Netflix will continue to increase its investment in original content.

Like Alphabet, Netflix doesn't mind changing its business model as the market evolves. The company already dominated the video-rental sector, crushing all comers under those once-ubiquitous red DVD mailers, only to effectively abandon that market in favor of a global video-streaming platform. Then, Netflix found out that original content breeds stronger growth and deeper customer loyalty than second-run shows licensed from other studios -- so the company is turning into an award-winning TV and movie studio before our eyes.

I don't know exactly how Netflix will develop over the next five decades, but I'm sure that the company will be a cross-sector media conglomerate by then, much like the Disney empire you see today. Netflix is investing lots of borrowed cash today in order to build the largest and most effective cash machine possible for the long haul. Patient investors will make a fortune with this stock in the long run.