There's no question that this has been a difficult time for investors. The Dow Jones Industrial Average is down 14% in 2022, the S&P 500 is off 19%, and the Nasdaq Composite has lost more than a quarter of its value. It's been the worst first-half-year stock-market performance in 50 years.

And there is a good chance things could get worse. Inflation is at a 40-year high of 9.1%, and the Federal Reserve raised interest rates by 75 basis points in June -- the biggest hike since 1994 -- and may do so again this month.

Lightning flashing behind warning sign.

Image source: Getty Images.

The one bit of good news is that energy prices have eased up a bit, though that's only because of fears we're careening toward a recession. Gasoline prices now average $4.53 per gallon at the pump compared to the unprecedented $5.00 per gallon one month ago. It's hardly something to cheer for, but we take our wins where we can find them.

Savvy investors know, though, that when the market crashes, the opportunity for real wealth creation is at hand. Not from shorting stocks, but because bull markets always follow bad times, and you now have the chance to buy good companies at discounted prices. Also, dividend-paying stocks help smooth over the harsh reality of those market downturns, which is why I look for those businesses that can weather both the highs and lows of the cycle with their dividends not only remaining intact but continuing to rise through it all.

Here are a pair of stocks you can count on to make it through no matter the market, and to help you achieve a lifetime of income and wealth.

1. 3M

Because 3M (MMM -0.66%) has been around for over 100 years, it has been through all types of markets and global macroeconomic and geopolitical events: depressions and recessions, world wars, global pandemics, and natural disasters. It may have gotten its start in mining, but today it's arguably best known as a maker of N95 masks and respirators.

Before COVID-19, though, people were more familiar with its Scotch brand tape, Post-It notes, ScotchBrite scrub pads, and the Command brand of hanging strips. Yet 3M covers not only consumer products and healthcare; it also serves the safety, industrial, transportation, and electronics industries. It sold more than $35.3 billion worth of products last year, up 10% from 2020, when demand for its healthcare products took off. 

While 3M is not immune from the effects of inflation and the protracted supply chain problems, it has the financial wherewithal to readily withstand such headwinds. It hasn't affected its dividend either, which yields 4.6% annually. The company has raised its payouts for 64 consecutive years, making it a Dividend King.

2. Lancaster Colony

You might not have even heard of Lancaster Colony (LANC -0.43%), which has only been around half as long as 3M and has a $3.6 billion market cap, which is but a fraction of the size of the household-name conglomerate. But what this company lacks in stature, it makes up for in financial prowess.

Lancaster Colony is a maker of specialty foods for retail and the food service industry, primarily dressings and breads that sell under the Marzetti, New York Bakery, and Sister Schubert's brands. They're not exactly names that jump off the grocery store shelf at you, but it also produces dressings for Olive Garden as well as sauces for major chains like Buffalo Wild Wings and Chick-fil-A. The dressings business accounts for almost 70% of its $1.47 billion in annual sales, and frozen bread products make up most of the remainder.

Lancaster has paid a dividend almost from the start, initiating its first payment in September 1963 and making 236 consecutive quarterly payments thereafter. It also proudly notes that it is one of only 13 companies on the market with 59 straight years of dividend increases. Its payout of $3.15 per share yields 2.5% annually at current prices.

Now Lancaster Colony isn't a cheap stock by most metrics -- its price-to-earnings ratio, for example, stands at 39, but that has been steadily rising over the past three decades -- but at two times sales, the bread and dressings maker is right in line with its historic averages.

The comfortable valuation suggests that buying Lancaster Colony stock on dips (it's down 35% from recent highs at the time of writing) and holding for the long term should generate good returns for your portfolio.