No, what seems illegal is forgoing vaccination. You want to forfeit a proven system to prevent widespread disease, then you should give up your right to live in the country. How vaccination isn't a mandatory thing by law, is beyond me.
Imagine if this kind of thinking prevailed in the HIV hysteria of the 80's/90's. It's relatively easy to follow this approach to its logical conclusion. When you order authoritarianism, it's very likely you'll get it. And not simply in the places you want it.
Are you good with a HIV+ person knowingly infecting others because it's their right to refuse antiviral medication? Measles and other highly contagious diseases can infect large populations without anyone knowing before it's too late.