Hunting for dividend stocks that will pay you for the rest of your life may initially seem overwhelming. However, by using the investing snap test -- where you snap your fingers and imagine an existence without a particular company's products -- you can get a sense of how vital a business is to the world.

Two companies that pass this snap test with flying colors (in my opinion) are lithography juggernaut ASML (ASML 2.04%) and the world's largest spice maker, McCormick (MKC 0.23%).

Were ASML's lithography capabilities -- which are used to create semiconductor chips in virtually any modern technology -- to disappear, our digitally driven world wouldn't function anywhere the same. On the slightly less dramatic end of the spectrum, should McCormick's spices disappear, our lives would rapidly become quite bland as the company's flavor solutions are used by most of the world's major snack and beverage brands.

Of course, new companies might gradually fill the void left in ASML's and McCormick's absence, but the time it could take to fill their shoes would not be fun. Thanks to this premise, I can't help but think that these two niche dominators would make for excellent bets to pay dividends for the rest of our lives.

ASML: Quietly one of the critical tech companies of our time

ASML is one of my favorite picks to pay dividends for the rest of my life. It's the dominant market leader in the lithography process, which involves transferring patterns onto the silicon wafers used in semiconductor chips. Whether it is ASML's more mature deep ultraviolet lithography (DUV) or its bleeding-edge extreme ultraviolet lithography (EUV), the company plays a crucial role in developing almost any of today's advanced technology.

Commanding an incredible 80%-plus share of the DUV industry and holding a monopoly on the EUV market, the company is a critical component of the semiconductor supply chain and a dominant force within its niche. Furthermore, as the world becomes ever more technologically dense with advancements in artificial intelligence (AI), the Internet of Things (IoT), electric vehicles (EVs), and renewable energy solutions, ASML's growth story could just be starting.

However, all investments come with risks, and ASML is no exception to that rule. Earlier this week, the United States further tightened restrictions upon semiconductor chips and equipment sales to China, which accounted for 46% of the company's sales in the last quarter. Despite this, Chief Financial Officer Roger Dassen doesn't expect these restrictions to have an effect in 2023 or beyond, as most of these Chinese sales came from backlogged orders of ASML's more mature products. 

Despite operating in the heart of a notoriously cyclical industry -- that management believes is currently bottoming -- ASML grew sales and earnings per share (EPS) by 15% and 12% in the third quarter. Boasting an impressive net profit margin of 28%, the company is perfectly positioned to continue raising its 1.1% dividend -- especially considering that it only uses 32% of its profits to fund the payout. 

With the shares down 19% in the last three months, ASML now sports a price-to-earnings (P/E) ratio of 29, well below its five-year average P/E of 41.

ASML PE Ratio Chart

ASML PE Ratio data by YCharts

While this is still slightly more expensive than the S&P 500's average P/E of 25, ASML's undeniable importance to the burgeoning global semiconductor industry makes it a promising candidate for a stock that will pay dividends for the rest of your life.

McCormick: Its growing dividend is at a decades-long high

If the frighteningly complex world of lithography doesn't suit your style, McCormick's spices and flavorings operations may be a more straightforward route to a lifetime of dividends. Since it operates in two business segments -- consumer (selling to Walmart and Kroger, for example) and flavor solutions (think Pepsi or Yum Brands) -- a world without McCormick would instantly become less tasty.

Home to such brands as French's mustard, Old Bay, Lawry's, and Zatarain's seasonings as well as Frank's RedHot and Cholula hot sauces, McCormick has quietly grown to account for roughly 40% of the U.S. flavor-enhancing industry. 

Despite this dominant position in the spice market, the company has seen its margins deteriorate rapidly as inflation continues to eat away at its profitability.

MKC Profit Margin Chart

MKC Profit Margin data by YCharts

With inflation ballooning, the company was forced to play catch-up by passing along price increases in its contracts with its customers over the last year. But it's finally seeing its gross profit margin improve.

Despite this gross margin improvement, the market has sent McCormick's stock down over 30% in the last three months after its EPS share plummeted 23% in its latest quarter and sales volume remained weak. With a price-to-sales (P/S) ratio of just 2.4, the company's valuation is at its lowest since 2016.

MKC PS Ratio Chart

MKC PS Ratio data by YCharts

Best yet for dividend-focused investors, the company's 2.6% dividend yield is the highest it has been in the past decade. With a 36-year dividend increase streak and a payout ratio of only 64% despite its temporarily depressed net profit margin, McCormick and its historically steady operations look attractively priced for investors seeking a lifetime of dividends.