Canaris saved Switzerland in 1940, but without their overt defence-readiness and non-intervention policy he wouldn't have been able to do so.
(It was the Swiss' overt army strength and fortification strength that allowed him to bluff and tell Hitler that Switzerland would be a too tough nut, while he had in fact long-obtained detailed and correct construction drawings and locations for every single Swiss fortification thanks to fabulous Humint.)
Spain and Portugal are fine examples for countries which could get along as neutral countries just fine. Sweden did well, too.
Besides; I was rather writing about deterrence and non-aggression policy than about neutrality. Defensive alliances that do not turn aggressive may be fine.
Repeat:
Occasionally deterrence is not perfect, but it's the prime mechanism to preserve peace next to good relations and not proved to be a failure at all.