Many stock market sectors took a beating at the start of the COVID-19 pandemic in Spring 2020. Cruise lines, casinos, and airlines were all battered -- to name a few.

But the energy sector was particularly hard hit. For instance, crude oil futures dropped to negative values per barrel which was the first time in U.S. history. The Energy Select Sector SPDR Fund (XLE -0.70%) dropped 62% in the first quarter of 2020. That compares with a dip of 32% for the S&P 500 over the same period.

Now, nearly two years later as countries are rescinding their pandemic restrictions, the demand for oil has increased. Who will benefit from this increased demand for energy? Well, the oil producers, of course. But also the companies that supply the machinery, services, and technology that help those producers bring their oil to market the fastest and cheapest way possible. Particularly, companies like Schlumberger (SLB -0.31%).

In fact, the company is already benefiting. Over the last 12 months, Schlumberger's 74% return has trounced the S&P 500's 22% gain.

Oil well operating using a tablet to monitor progress.

Image source: Getty Images.

Fueling the pandemic recovery

As the world increasingly returns to pre-pandemic life, society will need the energy to fuel the planes, trains, and automobiles that move people and goods from place to place. With oil trading at the highest level since 2014, there are incentives for oil producers to bring more barrels of crude to the market.

Although, getting that oil above ground isn't as simple as turning a spigot. Oil producers rely on oil services companies like Schlumberger to drill new wells or increase the flow from existing wells.

And with oil trading at multi-year highs, oil producers can afford to invest in the costly capital expenditures that will increase their output.

CFRA energy analyst Stewart Glickman notes, "Overall, we see upstream capital spending (the primary driver of oil services' revenues) rising in the 20%-25% range in 2022."

Schlumberger CEO Olivier Le Peuch also expressed a similar sentiment with the expectation that the company could yield significant multi-year growth since demand is beyond pre-pandemic levels. Essentially, it will likely take a long time for oil producers to ramp up production. And because of that, Schlumberger could benefit for years to come.

Margins keep on improving

There are always two ways to grow profits: increase revenue (sell more goods or services) or expand margins (raise prices, lower costs). Schlumberger is well-positioned to benefit from the broader cyclical bull market in the energy sector. But what about margins?

Schlumberger's earnings before interest, taxes, depreciation, and amortization (EBITDA) margins in Q4 2021, which ended on Dec 31, 2021, were 22.2% -- an increase of 2.1% from a year earlier. This was the sixth-straight quarter of increasing margins for Schlumberger, which focused on cutting costs and driving efficiencies during the pandemic.

But management isn't content with the current margins. Le Peuch has set a goal of 25% EBITDA margins by 2023. And Le Peuch sounds confident Schlumberger will hit the mark sooner rather than later. On the company's most recent earnings call, he expressed his confidence that the company could reach the targeted "adjusted EBITDA margin before the end of 2023."

So, why is Le Peuch so sure margins are on the rise? Well, the CEO has a bit of an ace up his sleeve.

Hidden tech play

Artificial intelligence and machine learning might not be the first thing that comes to mind when you imagine an oil services giant like Schlumberger, but technology is king -- even in the oil sector.

At 13% of 2021 revenues, Schlumberger's digital & integration division is the smallest of its four divisions. Well construction (38%), production systems (29%), and reservoir performance (20%) make up the bulk of its $23.1 billion of revenue.

However, the digital & integration division is the growth engine for Schlumberger. Fourth-quarter revenue was $889 million, with sequential growth of 10% and margins of 37.7%. Schlumberger noted that the increased margins were driven by "significantly higher digital and exploration data licensing sales."

One of the digital offerings driving those sales is Schlumberger's DELFI software. In its third year of deployment, DELFI now boasts 240 commercial customers with more than 160% user growth year over year.

As is the case in much of the energy sector, artificial intelligence and machine learning are helping energy companies run more efficiently and safely. AI can monitor millions of metrics constantly by checking that oil machinery is operating smoothly and providing maintenance alerts to limit future breakdowns.

With the increasing fuel needs, this technology could be crucial. Ultimately this might mean even more demand for Schlumberger's digital offerings.

So, should investors buy Schlumberger?

The trends look good, but what about the valuation?

Schlumberger trades at a price-to-earnings ratio of 29 and boasts a 1.29% dividend yield. This does represent a premium compared to a competitor like Halliburton (HAL -0.18%) which trades at 19 times earnings with a 1.53% dividend. However, Schlumberger's 74% return over the past 12 months has outpaced Halliburton's 62% return over the same period. Industry analysts also like the stock. Of the 32 analysts who follow the stock, 18 rate it as a buy, and none rate it as a sell.

So if you're looking to add an energy component to your diversified portfolio, it might be time to consider Schlumberger.