For reference, here is a of landlocked countries and their nominal GDP per capita for 2021 estimated by the IMF
All landlocked countries nominal GDP per capita:
Africa:
Asia:
Europe:
South America:
As you can see, Switzerland ranks third among the wealthiest landlocked countries, and even sixth among the world when it comes to nominal GDP per capita. The only two landlocked countries ahead are the micronation of Liechtenstein, which is often referred to as a mini Switzerland, and Luxembourg. What makes Switzerland particularly wealthy, when throughout most of history, lacking access to the sea correlated with lacking access to wealth?
What makes Switzerland particularly wealthy, when throughout most ofhistory, lacking access to the sea correlated with lacking access towealth?
Let me adress this first:
Throughout most of history, Switzerland (or rather: the area that is called Switzerland today - "modern" Switzerland was founded in 1848) wasn't a wealthy country. In fact not so long ago, Switzerland was one of the poorest countries in Europe.
So for the most time Switzerland was like you'd expect it from a landlocked country with a unfavorable topography, basically no natural resources and agricultural land of mediocore quality. In the early 19th century, hundreds of thousands of Swiss emigrated, trying to escape hunger and poverty.
However Switzerland had a few traits that let it rise quickly to one of the wealthiest countries. This happened mostly in the 20th century.
One notable trait is "neutrality". Switzerland hasn't participated in international wars for centuries. So among other things they mostly could avoid the devastation of the 1st and the 2nd World War. (Neutrality wasn't enough to avoid the wars, as the example of Belgium shows. But other than Belgium Switzerland had no interesting natural resources and an unfavorable topography. So those disadvantages turned into advantages when it came to not being invaded by the warring neighbours.)
A neutrality that kept the country out of war of course goes hand in hand with stability. And stability goes hand in hand with economical success.
Besides this it's simply a huge advantage if - after a big war - you are the only place nearby where the industry is still undamaged. We should not forget that Switzerland's neighbours are economical successful countries as well. So especially after the 2nd World War, the Swiss economy profitted from massive demand from Italy, France and most of all Germany who had to rebuild their own industries.
Also a positive foundation for economic development were the liberal governments that ruled Switzerland for many decades. In 1847, one year before modern Switzerland was founded, there was a little civil war where the liberals were victorious over the conservatives. In consequence they dominated politics for almost 100 years. So in times where it's neighbors still were ruled by monarchs, Switzerland was governed by merchants, entrepreneurs, journalists, teachers, engineers and lawyers. Lots of lawyers.
Switzerland being liberal (and later rich) in comparison also attracted quite a few creative minds. The Swiss Federal Institute of Technology profited a lot also from foreign scientists and is today still one of the world's leading STEM universities.
Generally it can be said that as a country with no natural resources to exploit it learned earlier than others to invest in it's own people and their education. This accelerated the success of the manufacturing industry first and the service sector later. It also led to a very diversified economy which is more resistant to crisis compared to economies that are focussed on only a few sectors. So that's another point where not having resources turned out to be a positive thing.
Of course we also have to mention the famous Swiss banks that gained a lot form the stability and also the bank secrecy. As we all know this "safe haven" attracted a lot of money - and ont only from clean sources. (Nazi gold, dictator's money.)
So all in all it of course had to do with fortunate circumstances but probably even more than that with making strenghts out of weaknesses.