Think of it like this: Growing up in an excessively sanitized environment leaves children's immune systems weak and makes them susceptible to serious diseases later.
The solution: Give children inoculations, let them play outside, etc., to exercise their immune systems in safe conditions.
Not the solution: Give children serious diseases.
When "getting everything perfect" is normal to you and not a refreshing exception, you feel like you're a screwup most of the time even when you haven't done anything wrong besides being too hard on yourself.
Actually giving serious diseases (well, infestations) is being investigated as a solution:
Children who grow up with serious diseases (i.e., diseases that cause them serious health problems) are weakened for the rest of their lives, which leaves them more vulnerable to illness later.
That is not the goal of this therapy. They will keep the parasite population in check (e.g., by using parasites that cannot reproduce on their own) to ensure that the patient's health is improved by the treatment, not worsened by it.
You could frame it the other way: “are people with sheltered childhood more likely to suffer mental illness”? And my experience would suggest that the answer is “yes”.
But i think not begin totally sheltered from every evil of the world will probably lead to a more well adjusted adult