It might seem odd to single out a company that faces significant near-term headwinds as being one whose best days are ahead of it, but it's important to focus on the long term with highly cyclical stocks like Rockwell Automation (NYSE:ROK). Even if now might not be the best time to pick up the stock, it's definitely one that investors should be following with a view to picking it up at some point. Let's take a look at why.

A history of long-term earnings growth

It's no secret that economic growth is slowing in 2019, particularly in the manufacturing sector, with some leading indicators -- such as the Institute for Supply Management's Purchasing Managers Index -- signaling that the U.S. manufacturing economy is now contracting. That's not great news for a company like Rockwell Automation -- industrial companies tend to cut back on automation investments when end demand is waning.

A graphic showing the smart factory revolution.

Image source: Getty Images.

However, the long-term trend in Rockwell's earnings is positive. As you can see in the chart below, the long-term compound annual growth rate of its earnings per share (EPS) is around 8% -- note that the chart (conservatively) starts from the high before the previous recession in Rockwell's fiscal 2009 and 2010.

Rockwell Automation adjusted EPS

Data source: Rockwell Automation, Chart by author. The figure for 2019 is the midpoint of company guidance.

Moreover, the company tends to be excellent at converting earnings into free cash flow (FCF), with a 110% conversion rate compared to net income.

Long-term earnings drivers

Rockwell's historical numbers are one thing, but what about its future growth prospects?

Here again, there's a reason for optimism. As the only major factory automation company in the U.S., Rockwell is well placed to benefit from the shift toward robotics automation. For reference, Emerson Electric and Honeywell International are more process automation companies -- meaning the processing of raw materials and chemicals, such as in an oil refining plant. 

Moreover, as the Industrial Internet of Things (IIoT) takes off and IT penetration increases in factories, there's going to be an increase in demand for Rockwell's controls, sensors, software, and system architecture.

Simply put, IIoT involves factories applying web-enabled devices to machinery in order to monitor and gather data on operations to better manage it. For example, think of an industrial gas turbine that's being monitored in order to determine when it needs servicing. The Internet of Things is a hot sector to be invested in, in general. 

Rockwell calls its smart manufacturing solutions The Connected Enterprise -- not to be confused with Honeywell Connected Enterprise, which is basically Honeywell's version of the same thing.

Rockwell's Connected Enterprise revenue was around $300 million in 2018. Although it was only around 5% of sales in 2018, management expects it to more than double by 2022 -- that would provide a significant boost to sales growth. In addition, around half of the Connected Enterprise revenue is recurring; this is good for two reasons. First, it implies Rockwell's earnings will be less cyclical in the future. Second, it's likely that recurring revenue will be higher-margin and generate relatively more FCF.

In fact, Rockwell is such an attractive company that Emerson Electric tried to buy it for $225 a share in 2017 -- a near 40% premium to the price of Rockwell's stock at the time of writing.

ROK Price to Free Cash Flow (TTM) Chart

ROK Price to Free Cash Flow (TTM) data by YCharts

Is Rockwell a buy?

The company definitely has a bright long-term future, but its near-term prospects have taken a turn for the worse in 2019 -- earnings guidance has been cut twice his year due to the slowing economy.

That said, the midpoint of current guidance is $8.60, and Rockwell will probably generate a $1 billion in FCF in fiscal 2019, meaning the company has a P/E ratio of 19 times full-year earnings and also 19 times FCF.

Those valuation metrics are not bad, but they may come under pressure because Rockwell's end markets appear to be continuing to deteriorate in 2019. Management thinks its fourth-quarter organic growth will decline by 3% to 3.5%. All told, Rockwell is a very attractive company, and it's the sort of stock that should be put on a watch list with a view to buying if it's aggressively sold off, but for now, it's stock looks a little pricey.