Switzerland's high standard of living is almost entirely due to their smartness. They kept out of wars and as a result could incrementally (and exponentially) build wealth instead of rebuilding their country from ruins every few decades.
People almost never vote in favor of war.
IIRC they even shot down german war planes that entered their airspace and suffered no retaliation.
So yeah, they do have a knack for maintaining their neutrality.