Warren Buffett once said his favorite holding period for a stock was "forever." However, simply buying and holding a stock forever -- or at least until you retire -- can be much more challenging than it sounds.

Steep drawdowns can rattle your confidence and cause you to prematurely dump a stock when you should be buying more shares. New competitive threats and poor management decisions can also challenge your original thesis.

However, there are still plenty of stocks that deserve to be bought and held forever in this challenging market. Here are three stocks from my own portfolio that I'd confidently hold forever: Apple (AAPL 0.57%), ASML Holding (ASML 2.07%), and Meta Platforms (META -1.32%).

A person gets showered by cash.

Image source: Getty Images.

1. Apple

Apple is an evergreen investment for four simple reasons: Its customers are fiercely loyal to its brand, the expansion of its services ecosystem reinforces that loyalty, its massive cash pile ($203 billion in cash and marketable securities as of its latest quarter) gives it plenty of options for growing its business beyond the iPhone, and it consistently rewards long-term investors with stable dividends and well-timed buybacks.

Over the past 10 years, Apple has reduced its number of outstanding shares by 38% as its stock price has risen by nearly 660%. After factoring in reinvested dividends, it's delivered a whopping total return of 785% during the decade -- which easily crushed the S&P 500's total return of nearly 300%.

Past performance never guarantees future gains, but Apple still has plenty of irons in the fire. It can launch more paid services for its massive audience of 785 million paid subscribers, expand its hardware portfolio with new AR and VR devices, or even launch its long-rumored electric vehicle to kick off a fresh era of growth to offset its decelerating sales of iPhones.

Apple's stock isn't cheap at 30 times forward earnings, but that premium reflects the market's confidence in its long-term growth potential. It might face a near-term slowdown as the global chip shortage and supply chain challenges disrupt its hardware shipments, but its future still looks bright.

2. ASML Holding

If you believe the world's appetite for smaller, denser, and more powerful chips will continue to rise, then you need to own some shares of the Dutch semiconductor equipment maker ASML.

ASML is the world's largest producer of photolithography systems, which are used to etch circuit patterns onto silicon wafers. It's also the industry's only producer of extreme ultraviolet (EUV) lithography systems, which cost about $150 million apiece, require multiple planes to ship, and are absolutely required for the production of the world's smallest chips. ASML perfected its EUV technology over the past three decades, which makes it practically impossible for smaller photolithography system makers to crack the market.

Taiwan Semiconductor Manufacturing, Samsung, and Intel all use ASML's current-gen EUV machines, and they'll continue to use its next-gen "high-NA" EUV machines to manufacture even smaller chips. Those sticky relationships make ASML a linchpin of the global semiconductor market.

Like Apple, ASML returns a lot of its cash to investors through buybacks and dividends. It reduced its number of outstanding shares by 28% over the past 10 years as its stock price surged more than 880%. After factoring in its dividends, it generated a market-crushing total return of over 1,000%.

ASML faces some near-term supply constraints and its stock might seem a bit pricey at 36 times forward earnings. However, its monopolization of a key piece of chipmaking technology, its rock-solid growth rates, and its shareholder-friendly practices all justify that higher valuation.

3. Meta Platforms

Meta's stock crashed in February after the social media giant predicted its revenue would only rise 3%-11% year over year in its first quarter. It blamed that slowdown on Apple's privacy update on iOS, which disrupted its targeted ads, and competition from ByteDance's TikTok. Its dedication to burning more cash with its Reality Labs metaverse business -- which posted an operating loss of $10.2 billion in 2021 -- also alarmed investors.

However, Meta's sell-off also reduced its forward price-to-earnings ratio to 18, making it the cheapest FAANG stock by a mile. Even after factoring in its near-term slowdown, analysts expect Meta's revenue to rise 12% this year and grow another 17% in 2023, so it certainly isn't doomed yet.

Meta still ended 2021 with a whopping 3.59 billion people -- nearly half the world's population -- using its family of apps (Facebook, Messenger, Instagram, and WhatsApp) each month. That's up 9% from a year ago. It also holds a near-duopoly in digital ads across many markets with Alphabet's Google, so it will likely remain a default choice for most advertisers.

Meta faces some near-term growing pains as it focuses more on video content, which is tougher to monetize, and the money-losing expansion of its metaverse business. But over the long term, Meta will likely find fresh ways to monetize its massive audience and generate better returns for its investors.