You might be frustrated if you've been a shareholder of data center REIT Digital Realty Trust (DLR -0.71%); the stock's fallen nearly 30% since January, leaving shares just 10% higher than five years ago.

However, don't assume that the next five years will look like recent times; here is why the stock could be an excellent buy for 2022 and beyond.

The digital landlord

The world is becoming increasingly digital, but data centers, facilities dedicated to housing massive computing systems, are the physical infrastructure that makes the digital world work. Digital Realty Trust is a real estate investment trust (REIT) that owns and maintains more than 290 data centers around the globe, including the Americas, Europe, the Middle East, Africa, and the Asia Pacific region.

It's easier for most companies to outsource the cost and effort of owning data centers. Digital Realty works with more than 4,000 customers, including some of the world's largest companies like Afterpay, AT&T, and Adobe.

Digital Realty is a massive player in the data center space; it's the seventh-largest publicly traded U.S. REIT, and one of only two dedicated to data centers.

Why buy in 2022?

The stock has struggled to get off the ground over the past five years; after the current bear market pushed shares back toward $120, investors have now waited five years to receive minimal capital gains (not counting dividends).

One might see how investor sentiment might sour on Digital Realty; the 2022 year has featured depressed share prices, rising interest rates, and fear of a potential recession. These factors don't create an environment for growth in the technology sector; capital could become more difficult to come by, and the potential for less spending and expansion could trickle down to Digital Realty as less demand for data centers.

However, Digital Realty's bookings hit a record $167 million in the first quarter of 2022, signaling strong business momentum. Furthermore, you can see below that the company's cash profits, called funds from operations (FFO), have dramatically grown, roughly doubling over the past five years.

If you look at the stock's valuation from the standpoint of price-to-FFO, the current ratio is just under 12, despite the business growing FFO per share by an average of 10% annually since 2005. In other words, you're getting a pretty low valuation on a company that's consistently growing its profits.

DLR Chart.

DLR data by YCharts.

Don't gloss over the company's solid dividend. Investors can get a 3.8% dividend yield at the current share price, and management's raised the payout for 17 consecutive years. The dividend's payout ratio is 77% of FFO per share, so there's plenty of room for increases, especially considering Digital Realty's steady growth.

There are probably worse ideas than a cheap stock with a growing and sustainable dividend. But the stock's current struggles might be an even better long-term opportunity.

Reasons to hold for the years beyond

Digital Realty's long-term appeal is as simple; it's a strong player in a real estate niche that will likely see tremendous growth.

An estimated 80% of the world will be online by 2024, and 41% of a typical enterprise's revenue could come from digital products and services by 2027. A massive shift is going on, where increasing amounts of the economy are moving to digital.

But data doesn't expire; instead, we're constantly creating more over time. Demand for data centers could continue climbing over the years, and you can already see some of this in the tea leaves. 

Emerging markets could play a role in growth; Digital Realty's already moved on this, signing a joint venture with Brookfield Infrastructure in India last fall. It also spent $3.5 billion to acquire a majority stake in South African data center firm Teraco, further expanding its footprint into emerging markets.

Admittedly, despite these positive clues about what the future might hold, nobody can know for sure, and investors will need to monitor the company's execution over the coming quarters. However, the current dividend is well funded, the stock is at a bargain valuation, and the future appears bright.