It is a silly idea. There's pretty good evidence it's false. Your immune system might benefit from some types of stimulation, but those are from:
1) Parasites
2) Generic (as opposed to human) bacteria
3) Mild, latent infections which co-evolved with humans
The problem is that most diseases like colds, flus, smallpox, measles, etc. are relatively recent in evolutionary terms. They rose with the rise of civilizations. In hunter-gatherer times, things like colds didn't exist.
This sounds a lot like "paleo diet" reasoning, which mostly seems to be bunk.
I am not saying that your claim definitely is wrong, but it does sound a lot like other claims that many people believe are not valid. So my initial reaction is "extreme skepticism".
Even if these viruses didn't exist before modern civilization, how do we know that they aren't at all relevant for immune system "fitness" in modern humans?
You're welcome to that reaction. I'd recommend the book "Immune: A Journey into the Mysterious System That Keeps You Alive" by Philipp Dettmer.
It has a whole chapter on the hygiene hypothesis, which parts have been debunked, which parts have weak scientific evidence, and which parts have strong scientific evidence.
I don't think I wrote anything out-of-line with mainstream science. It might be wrong -- scientific knowledge progresses, and we're still learning a lot -- but it's not "paleo diet" junk science.
The key mistake you're making is to assume the immune system benefits from some form of "fitness;" it doesn't. It's not a muscle to be exercised. Diseases harm you and getting sick is not good.
There are exceptions.
The key thing to remember is that the immune system does most of the damage to your body in most diseases; viruses and bacteria rarely kill you, since collateral damage from your immune system fighting them usually kills you first. There's a fine balance of how active the immune system ought to be. Parasites dampen your immune system. We co-evolved with parasites, and without them, your immune system is a little bit overactive (which may contribute to the massive recent rise of autoimmune diseases, allergies, etc.).
We know that modern diseases aren't helpful because at this point, we understand how they work. Modern viruses and bacteria -- which evolved with civilization -- are incredibly specific to humans. They "spoof" signals your body uses, for example to modulate the immune system's response. Historically, we'd have diseases which attacked many types of animals, and didn't do that; those were very different.
To give an analogy to defending a city, there's a difference between a broad attack and a targeted attack. Classic diseases are a bit like invaders at the city walls. Modern diseases are a little bit like spies and saboteurs.
And it has to be said that we do appear in fact to know with a good degree of certainty that at least one of the common cold viruses is very, very new in humans.
OC43 (a coronavirus) almost certainly arrived in humans in the 1890s (and is now thought to be what caused the deadly "Russian Flu" pandemic).
It isn't bunk to eat whole foods that were favored by our ancestors. You'd have a better diet than the large majority of people. We evolved to eat this stuff which is exactly why we stop getting diabetes and obesity when we stick to it.
I should have been more specific. The paleo diet specifically prohibits grain and dairy. My understanding was that this is an unscientific idea of "what our prehistoric ancestors ate", because homo sapiens is at least partially adapted to eating those foods. Is my understanding not correct?
I wouldn't go so far as to say unscientific, because as you say we are only partially adapted to it (e.g. lactose intolerance), and grains are an extremely easy source of calories which is problematic in a context of the obesity crisis and problematic when it's only simple carbohydrates being consumed by poor people such as potatoes or white rice (vitamin deficiencies). I don't expect epistemically sound and measured statements from a community around a diet that's become a social media fad, anyways.
I understand we can slip into the naturalistic fallacy easily, but at the same time I appreciate the line of reasoning as a first approximation because of how complicated the human body and nutrition is, and how messed up our public health situation is thanks to the modern diet. Even though I acknowledge this situation is attributable to processed foods and sugars, and not to whole grain consumption which I think is fine/good for most people, it is still the delta between modernity and how our bodies evolved that is the culprit.
Let's put it this way. The Paleo community is probably totally wrong about whole grains, but right about a lot of things.
I've read the book. That chapter talks about what kind of environment initially "trains" the immune system. It does not say anything about viruses such as the ones that common cold being ineffective in doing the same. Please be careful when extrapolating from what's written in a pop science book.
1) Parasites
2) Generic (as opposed to human) bacteria
3) Mild, latent infections which co-evolved with humans
The problem is that most diseases like colds, flus, smallpox, measles, etc. are relatively recent in evolutionary terms. They rose with the rise of civilizations. In hunter-gatherer times, things like colds didn't exist.