Charley Ding spent weeks early in the pandemic intubating patients sick with Covid-19. The 42-year-old anesthesiologist in South Barrington, Ill., said he has since watched most of the doctors and nurses he works with get infected at some point.

But he’s never gotten Covid-19, he said. “It’s probably a combination of being careful, maybe being blessed with a good immune system,” he said. “But also just luck.”

Dr. Ding is a member of a shrinking club of people who are pretty sure they have never been infected with SARS-CoV-2, the virus that causes Covid-19. Geneticists and immunologists are studying factors that might protect people from infection, and learning why some are predisposed to more severe Covid-19 disease.

For many, the explanation is likely that they have in fact been infected with the virus at some point without realizing it, said Susan Kline, professor of medicine at the University of Minnesota Medical School. About 40% of confirmed Covid-19 cases are asymptomatic, according to a meta-analysis published in December in the Journal of the American Medical Association.

More than two years into the pandemic, most people worldwide have likely been infected with the virus at least once, epidemiologists said. Some 58% of people in the U.S. had contracted Covid-19 through February, the Centers for Disease Control and Prevention has estimated. Since then, a persistent wave driven by offshoots of the infectious Omicron variant has kept daily known cases in the U.S. above 100,000 for weeks.

Cate Vallone has taught Pilates classes and clients in-person throughout most of the pandemic without testing positive.

Photo: Yehyun Kim for The Wall Street Journal

Yet some people still haven’t gotten sick or tested positive for Covid-19.

Cate Vallone said she has taught Pilates classes and clients in-person throughout most of the pandemic without testing positive. She credited masks and her immune system with helping her evade the virus. She recalled a brush before Christmas last year when her brother, his fiancée and their son tested positive for Covid-19 hours after she and her daughter spent the day with them.

“For a little while we felt bulletproof, I’m not going to lie,” said Ms. Vallone, 44 years old.

SHARE YOUR THOUGHTS

Have you or someone you know managed to avoid getting Covid? Join the conversation below.

Jerom Morris, bar director at Little Fatty and Accomplice Bar in Los Angeles, said he and his wife have evaded Covid-19 despite working indoors around people. “At some point we were wanting to get it, just to get it over and done with,” Mr. Morris said. “But I drew the line. That’s a little bit sadistic.”

Mr. Morris said he has taken to carrying his own silverware and straw so that he isn’t swapping spit with co-workers while tasting new menu items. He considers himself healthier than the average person, visiting the gym three or four times a week. He said he believes he’s never had Covid-19 because generally when he gets sick, he gets very sick but has gotten tested about a dozen times.

About 90% of people who get Covid-19 make antibodies that can be detected in their blood, said Sheldon Campbell, a pathologist and lab-medicine doctor at Yale Medicine.

Jerom Morris, who works at a bar in Los Angeles, has evaded Covid-19 despite working indoors around people.

Photo: Ryan Young for The Wall Street Journal

That leaves one-tenth of people whose prior infections are more difficult to confirm. “There are probably a fair number of people out there who did get Covid and didn’t make antibodies,” Dr. Campbell said.

Most tests can’t distinguish antibodies from infection versus those generated by vaccination. Because current Covid-19 vaccines target the virus’s spike protein, using a test that looks for antibodies that target a different protein, called the nucleocapsid, can distinguish a prior infection. Such antibody tests are available from companies including Laboratory Corp. of America and Quest Diagnostics but may not be widely available, and some providers may not know which test they have on hand, laboratory clinicians said.

The CDC and the Food and Drug Administration discourage antibody testing in many cases, in part because they only show that a person was infected or vaccinated, not how much protection antibodies might provide.

Researchers are studying factors that might keep the virus from infecting some people, or that affect how a person responds to the virus. “There are superspreaders who get infected and have no symptoms and there are others who have risk factors that make them much more susceptible,” said Steven M. Lipkin, a clinical geneticist at Weill Cornell Medicine in New York City who is part of a group of scientists that found a genetic marker that might make some people more vulnerable to Covid-19.

Other researchers are scanning the genomes of Covid-19 patients for traits that might drive the immune response to Covid-19, or deconstructing lung cells to determine which genes help the virus spread.

Research has suggested that mutations in genes that drive immune response to viruses can affect a person’s ability to fight the disease.

Ivan Panko said he has worked on a factory floor in South Carolina throughout the pandemic without ever testing positive for Covid-19. He said he believes vaccinations and brushes with pathogens during his time in the military protected him from the virus.

“My body’s been exposed to so much crap,” he said.

Most people have likely been infected at least once, and public gatherings are now common at places like Venice Beach in Los Angeles.

Photo: Ryan Young for The Wall Street Journal

Masks aren’t worn as often as before at outdoor dining areas such as this one in West Hartford, Conn.

Photo: Yehyun Kim for The Wall Street Journal

Immunologists are studying whether exposure to one type of pathogen can trigger an immune response against others including SARS-CoV-2. A study published in the journal Science Immunology this month found some people had T-cells in their guts and on their skin before the pandemic began that appeared to help them fight SARS-CoV-2.

There is some evidence that some people who may have been exposed to certain coronaviruses before the pandemic are equipped with cells that attack SARS-CoV-2 before it can spread, said Steve Jameson at the University of Minnesota Medical School.

“Some people come with a little bit of a head start,” he said.

People who don’t know whether they have been infected should be careful, Dr. Jameson said, because they might yet get sick as antibodies wane and new variants arrive.

“There are plenty of people who’ve had the vaccines or even had Covid and then have gotten Covid again,” he said. “It’s not as if it makes you immortal.”

Write to Julie Wernau at Julie.Wernau@wsj.com