That's not the reason they have "enormous wealth". I think Switzerland understood early on that it's important for them to invest in science, education and innovation because they don't have any other natural resources.
Incentivizing companies like Google to set up shop in Switzerland of course is related to the low taxes, but also access to talent with great technical schools (ETH, EPFL). Furthermore, companies know that people would love to relocate to Switzerland to work for them.
This in turn leads to more money for research, academia and education in general. It's virtuous cylce.
Obviously, there are many more factors. And yes, maybe it helped that there was the bank secracy law and criminals and the Germans during WWII parked their money in Switzerland, but I would say that's not the determining factor.
Disclaimer: I'm Swiss, so probably biased.