The Consumer Price Index (CPI) surged 8.5% higher on a year-over-year basis in July. The increase came in below analysts' expectations of an 8.7% increase and was 0.6 percentage points below the CPI reading for June.

Yet inflation is still near a four-decade high. What is an investor to do to preserve his or her purchasing power? The basic answer is to buy and hold quality companies in booming industries. You can also improve your chances by focusing on safe dividend stocks that perform well on price appreciation.

Let's take a look at two stocks that arguably fit these requirements and might make great additions to an investment portfolio.

Person paying with card at cafe.

Image source: Getty Images.

1. Visa

With nearly 4 billion credit and debit cards in circulation as of March and a market capitalization of $434 billion, Visa (V 0.05%) is the largest publicly traded payments company in the world. And it's not even that close: The next biggest peer is Mastercard, which had 2.5 billion credit or debit cards in circulation as of March and a market cap of $340 billion. 

Over the past 10 years, Visa has delivered blistering 21.5% annualized returns. This would have been enough to parlay a $10,000 investment into nearly $70,000. For context, these returns are nearly 10 times the average annual inflation rate posted in the past decade. And that's still more than double the currently elevated inflation rate. How was this inflation-crushing performance possible?

Visa's business model is very similar to that of a toll-booth operator. The company receives a small percentage of the gross dollar volume for transactions on its network. It also collects a fixed fee on each transaction completed by its payment infrastructure. As long as inflation throughout the world doesn't escalate to hyperinflation and led to significantly fewer transactions, higher prices actually act as a catalyst to boost the company's gross dollar volume. This results in both higher revenue and non-GAAP (adjusted) diluted earnings per share (EPS).

Thanks to the trends of cash-alternative payments and e-commerce, Visa has plenty of room for growth moving forward. That's exactly why analysts believe that the company's adjusted diluted EPS will increase at 18.2% annually over the next five years.

Visa's current 0.7% dividend yield is well below the 1.5% average yield of stocks in the S&P 500. But part of the reason for that is the stock's strong price appreciation tends to dampen the yield rate. Worries about that low rate can also be eased when you notice that another metric, the dividend payout ratio, is hovering around 20.9%. That suggests there is plenty of room for dividend growth. Visa's double-digit annual dividend growth potential should partially compensate for its lower starting yield.

Visa's stock is trading at a bit of a premium with a forward price-to-earnings (P/E) ratio of 25.1. This is considerably higher than the credit services industry's average forward P/E ratio of 15.9. However, Visa's business model is much lower risk than most of its peers since it doesn't extend credit to customers. The stock's premium price is reasonable considering the company's potential to build massive wealth for shareholders over the next decade.

2. UnitedHealth Group

If you thought Visa had an advantage over its peers, it pales in comparison to UnitedHealth Group's (UNH 1.35%) tremendous advantage over its competitors. The company's $499 billion market cap is more than those of the five next biggest health insurers combined

Unsurprisingly, this unparalleled scale will position UnitedHealth Group to profit from favorable global trends more than its competitors. The world is growing larger and older -- not to mention that medical care costs are rising.

This will lead more people around the world to rely on health insurers like UnitedHealth Group to hedge against rising costs. And it's why the market research company Global Market Insights is forecasting that the global health insurance industry will grow 4.6% each year, from $2.8 trillion in 2020 to $3.9 trillion in 2027.

UnitedHealth Group should be able to capture an outsized share of that forecasted industry gain, and it shouldn't have any difficulty passing on premium hikes to its customers to combat the forecast rising costs. With a net margin of 6.3% on its $160.5 billion in revenue through the first half of 2022, the company is quite profitable for a health insurer. Due to the promising industry growth outlook, analysts are predicting that UnitedHealth Group will generate 14.4% annual adjusted diluted EPS growth for the next five years. 

In the last 10 years, UnitedHealth Group has produced 28.4% annual total returns. For context, this absolutely torched the average annual inflation rate over the last 10 years. And it would have turned a $10,000 investment into $121,000 with dividends reinvested. 

Given that its dividend payout ratio will be approximately 29% in 2022, UnitedHealth Group is safe to initiate many years of double-digit annual dividend growth in its future. That makes up for the low starting yield of 1.1%, which is also somewhat lower than the S&P 500 average because of significant stock price growth (up 8.2% year to date in a down market).

The stock's forward P/E ratio of 21.4 isn't cheap, considering that the healthcare plan industry's average forward P/E ratio is 16.6. But quality comes at a price, and this isn't really an excessive valuation for a gem like UnitedHealth Group either.