The hygiene hypothesis suggests a lack of exposure to infections, parasites and symbiotic microorganisms (gut bacteria) predisposes one to allergies and autoimmune disease. There are a number of observations that support the hygiene hypothesis, but some of the proposed mechanisms aren’t supported.
The story with autoimmune disease and infections is complex: some parasites and infectious agents suppress the immune system to enhance their survival, which also has the effect of protecting against autoimmune disease, asthma and allergies; while others can trigger and/or accelerate autoimmune disease due to increased immune activity and inflammation.
However, while infections can trigger an autoimmune reaction, that doesn’t explain why the immune system continues to attack the body after the pathogen has been destroyed and why the incidence of autoimmune disease increased while infectious disease has decreased. The answer lies in the adaptive immune system.
The adaptive immune system is made up of T cells and B cells. There are 3 main types of T cells: (1) T helper cells, which stimulate the immune response; (2) cytotoxic T cells, which kill stuff; and (3) regulatory T cells, which reduce the immune response after the infectious agent is cleared and prevent the immune system from attacking the body or harmless antigens (like in allergies). In autoimmune disease there is an excess of T helper cells (particularly Th17 cells) and/or insufficient regulatory T cells (and often a lack of cytotoxic T cells), which creates a hyperinflammatory and poorly regulated immune response
Things that increase the Th17:Treg cell ratio
Things that decrease the Th17:Treg cell ratio
Dysbiosis and intestinal infections
Soluble fibres (and butyric acid)
Probiotics (supplemental good bacteria)
Circadian rhythm disruption
Vitamins A and D
Estrogen tends to increase the ratio, while testosterone decreases it, which can explain the difference in rates of autoimmune disease between the sexes. Vitamins A, vitamin D and zinc have the added bonus of also increasing the cytotoxic T cell function
Autoimmune disease requires contact with environmental antigens and intestinal permeability (leaky gut) increases exposure to environmental antigens. Intestinal permeability is associated with autoimmune disease, asthma and allergies, precedes autoimmune disease and may be necessary for autoimmune disease to develop
It seems there are four necessary factors for autoimmune disease to develop:
1. Genetic susceptibility
2. Exposure to the autoimmune-inducing antigen
3. A poorly regulated immune system (high Th17:Treg cell ratio)
4. Intestinal permeability
While these posts were mainly about autoimmune disease it’s also relevant to allergies and asthma. All three conditions are evidence of a dysfunctional immune system and are all associated with dysbiosis. Autoimmune disease and food allergies are associated with intestinal permeability and other allergies may be associated with equivalent conditions elsewhere such as increased skin permeability
Some Strategies for Autoimmune Disease
This is for informational purposes only and is not meant to diagnose or treat any medical condition.
Improve Immune Regulation
Ensure good amounts of:
- Vitamin A (liver, eggs, dairy, vegetables)
- Vitamin D
- Zinc (most foods, particularly animal foods and especially shellfish)
- Sleep, while optimising circadian rhythms (sleep at night, in the dark, without much blue light or food prior to sleeping, and with light and exercise during the day. See here)
Reduce/manage chronic stress (see Manage Your Stress) and chronic inflammation (see Causes of Inflammation).
Correct dysbiosis. Some strategies include:
- A low FODMAP diet (which is very effective for IBS) to decrease rapidly fermentable carbohydrates that may adversely affect gut health (including intestinal permeability) and are a source of food for pathogenic bacteria 
- A diet rich in soluble fibres (fruit and vegetables) to provide food for beneficial bacteria. Resistant starch seems like an attractive therapy but can be a problem for some people, particularly in high doses and for those with SIBO (see if it works for you, but read the links before trying)  
- Use antibiotics only when necessary (and not for colds, which are viral infections). Antibiotics kill both beneficial and harmful bacteria, and so can be very useful, but in doing so it creates a window for pathogens to take hold
- Reduce alcohol. In animal models of alcoholic liver disease there is dysbiosis, although the alcohol intake was 40% of total calories 
Low dose naltrexone (LDN) is a lower dose (5 mg vs. 50 mg) of the drug naltrexone, an opioid receptor blocker originally used for alcohol and opioid dependence. LDN has been found to be quite effective for Crohn’s disease in clinical trials   . It’s thought to work by increasing opioid signalling (temporarily blocking the opioid receptor, leading to a supercompensation of opioid signalling where opioids, opioid receptors and receptor sensitivity increases) and opioids increase regulatory T cells  
Reduce Intestinal Permeability
See this post on Suppversity for list on things that are either helpful or harmful for intestinal permeability. Of the items on the list I would guess that gliadin (wheat), alcohol and NSAIDs would be among the more important, but also correcting dysbiosis and the stuff on the list related to gut bacteria (probiotics, butyric acid, beta-glucans)
On the internet you can see many people who have had success cutting out certain foods from their diet, particularly wheat, all grains, dairy, legumes, nightshades, eggs, nuts and seeds or some combination of the above. The effectiveness of cutting out those foods seems to be somewhat variable, for example one person may find great relief from cutting out nightshades, whereas another doesn’t notice any change. Use an elimination diet to determine the effect of foods by cutting out at least one food for a period of time (a month or so) and then reintroduce it and see how you feel.
You could try the Paleo autoimmune protocol to cut out many potentially problematic foods and reintroduce some of them progressively. For a heavy handed approach there’s also the GAPS diet. Both the Paleo autoimmune protocol and the GAPs diet have been designed for autoimmune disease and other gastrointestinal problems. You’re not meant to be on either of them long term and they should be tried only if a standard, strict Paleo isn’t working. Although most of the time, if someone is following a Paleo diet and not getting results it’s probably due to stress, sleep or some other thing being the weakest link
List of Autoimmune Diseases
The following list of autoimmune diseases comes from the American Autoimmune Related Diseases Association. (Use Control + F to find if what you’re looking for is on the list)
Acute Disseminated Encephalomyelitis (ADEM), Acute necrotizing hemorrhagic leukoencephalitis, Addison's disease, Agammaglobulinemia, Alopecia areata, Amyloidosis, Ankylosing spondylitis, Anti-GBM/Anti-TBM nephritis, Antiphospholipid syndrome (APS), Autoimmune angioedema, Autoimmune aplastic anemia, Autoimmune dysautonomia, Autoimmune hepatitis, Autoimmune hyperlipidemia, Autoimmune immunodeficiency, Autoimmune inner ear disease (AIED), Autoimmune myocarditis, Autoimmune pancreatitis, Autoimmune retinopathy, Autoimmune thrombocytopenic purpura (ATP), Autoimmune thyroid disease, Autoimmune urticaria, Axonal & neuronal neuropathies, Balo disease, Behcet’s disease, Bullous pemphigoid, Cardiomyopathy, Castleman disease, Celiac disease, Chagas disease, Chronic fatigue syndrome**, Chronic inflammatory demyelinating polyneuropathy (CIDP), Chronic recurrent multifocal ostomyelitis (CRMO), Churg-Strauss syndrome, Cicatricial pemphigoid/benign mucosal pemphigoid, Crohn’s disease, Cogans syndrome, Cold agglutinin disease, Congenital heart block, Coxsackie myocarditis, CREST disease, Essential mixed cryoglobulinemia, Demyelinating neuropathies, Dermatitis herpetiformis, Dermatomyositis, Devic's disease (neuromyelitis optica), Discoid lupus, Dressler’s syndrome, Endometriosis, Eosinophilic fasciitis, Erythema nodosum, Experimental allergic encephalomyelitis, Evans syndrome, Fibromyalgia**, Fibrosing alveolitis, Giant cell arteritis (temporal arteritis), Glomerulonephritis, Goodpasture’s syndrome, Granulomatosis with Polyangiitis (GPA) see Wegener's, Graves' disease, Guillain-Barre syndrome, Hashimoto's encephalitis, Hashimoto’s thyroiditis, Hemolytic anemia, Henoch-Schonlein purpure, Herpes gestationis, Hypogammaglobulinemia, Idiopathic thrombocytopenic purpura (ITP), IgA nephropathy, IgG4-related sclerosing disease, Immunoregulatory lipoproteins, Inclusion body myositis, Insulin-dependent diabetes (type1), Interstitial cystitis, Juvenile arthritis, Juvenile diabetes, Kawasaki syndrome, Lambert-Eaton syndrome, Leukocytoclastic vasculitis, Lichen planus, Lichen sclerosus, Ligneous conjunctivitis, Linear IgA disease (LAD), Lupus (SLE), Lyme disease (chronic), Meniere’s disease, Microscopic polyangiitis, Mixed connective tissue disease (MCTD), Mooren’s ulcer, Mucha-Habermann disease, Multiple sclerosis, Myasthenia gravis, Myositis, Narcolepsy, Neuromyelitis optica (Devic's), Neutropenia, Ocular cicatricial pemphigoid, Optic neuritis, Palindromic rheumatism, PANDAS (Pediatric Autoimmune Neuropsychiatric Disorders Associated with Streptococcus), Paraneoplastic cerebellar degeneration, Paroxysmal nocturnal hemoglobinuria (PNH), Parry Romberg syndrome, Parsonnage-Turner syndrome, Pars planitis (peripheral uveitis), Pemphigus, Peripheral neuropathy, Perivenous encephalomyelitis, Pernicious anemia, POEMS syndrome, Polyarteritis nodosa, Type I, II, & III autoimmune polyglandular syndromes, Polymyalgia rheumatic, Polymyositis, Postmyocardial infarction syndrome, Postpericardiotomy syndrome, Progesterone dermatitis, Primary biliary cirrhosis, Primary sclerosing cholangitis, Psoriasis, Psoriatic arthritis, Idiopathic pulmonary fibrosis, Pyoderma gangrenosum, Pure red cell aplasia, Raynauds phenomenon, Reflex sympathetic dystrophy, Reiter’s syndrome, Relapsing polychondritis, Restless legs syndrome, Retroperitoneal fibrosis, Rheumatic fever, Rheumatoid arthritis, Sarcoidosis, Schmidt syndrome, Scleritis, Scleroderma, Sjogren's syndrome, Sperm & testicular autoimmunity, Stiff person syndrome, Subacute bacterial endocarditis (SBE), Susac's syndrome, Sympathetic ophthalmia, Takayasu’s arteritis, Temporal arteritis/Giant cell arteritis, Thrombocytopenic purpura (TTP), Tolosa-Hunt syndrome, Transverse myelitis, Ulcerative colitis, Undifferentiated connective tissue disease (UCTD), Uveitis, Vasculitis, Vesiculobullous dermatosis, Vitiligo, Wegener’s granulomatosis (now termed Granulomatosis with Polyangiitis (GPA)
**NOTE Fibromyalgia and Chronic Fatigue are listed, not because they are autoimmune, but because many persons who suffer from them have associated autoimmune disease