A few years ago, telecom giant AT&T (T -1.43%) was not the kind of stock you could buy and forget. The company's foray into the media business was turning into an expensive disaster, muddling the results of the core wireless business.

AT&T has since shed its media assets, completing its transition back to a pure telecom company last year with the spin-off of WarnerMedia. The story is now dead simple: wireless and fiber internet. AT&T can focus its efforts and its resources on growing both businesses, and its ample cash-flow generation fuels a solid dividend.

Stable businesses

AT&T isn't immune from a tough economic environment, but what it sells is about as necessary as electricity and water for most people. Consumers may delay smartphone upgrades to trade down wireless plans to a degree, but almost no one is going to drop wireless service entirely.

While the strong wireless growth AT&T enjoyed in 2021 is unlikely to be repeated, the company sees current wireless-demand levels roughly in-line with recent trends. AT&T still expects to produce wireless-service revenue growth of at least 4% in 2023 -- not a bad result given the economic backdrop.

In the fiber business, penetration rates are holding steady as the company expands its network. The plan is to pass 30 million homes and businesses by 2025, up from 24 million at the end of 2022. While investments in the fiber-network expansion take time to pay off, the upside is higher average revenue per user (ARPU). Fiber monthly ARPU is about $10 higher than AT&T's legacy-broadband services, and the gap for intake ARPU is even larger.

Like wireless service, home internet is essentially a utility that few will choose to go without. And in the areas where AT&T rolls out its fiber service, it will likely be the fastest internet option for consumers and businesses.

Cost cuts, cash flow, and a healthy dividend

While demand for its services is generally strong, AT&T is taking action to reduce costs in an uncertain economic environment. As of the end of 2022, the company had already found $5 billion in cost savings as part of its $6 billion cost-cutting efforts. Those cost cuts should have a positive impact on the bottom line this year, offsetting the negative impacts of inflation.

These cost cuts will help AT&T hit its goal of producing $16 billion in free cash flow this year, up from $14.1 billion in 2022. Free cash flow should rise further in 2024 and beyond as the company completes major capital projects. Capital investment is expected to peak in 2022 and 2023 as the company spends heavily to support the 5G wireless and fiber businesses.

This cash flow is more than enough to support the current dividend. The company reduced its dividend as part of its WarnerMedia spin-off last year, but the current quarterly dividend of $0.2775 per share still works out to a yield of about 6.1%. That dividend will eat up about 52% of free cash flow in 2023, assuming the company hits its guidance.

What's left over of AT&T's free cash flow can be plowed into reducing debt. The company still has a debt-heavy balance sheet, partly a legacy of its failed media ambitions, but it's been making progress paying it down. Total debt declined by $40 billion in 2022 to $136 billion.

With AT&T no longer exposed to the media business and its dependence on advertising revenue, the company's results should be far more predictable in the coming years. A high dividend yield, a market capitalization that's just over 8 times free-cash-flow guidance, and the potential for significant free-cash-flow growth in the years ahead make AT&T a stock to buy and hold through the current economic storm.