Just for context, according to https://swisstaxcalculator.estv.admin.ch/ your marginal tax rate should be around 15% if you live in Zurich.
As you pointed out, if you want to buy a flat / house in the next few years, the 3a might be more worth it (since you can “use” it earlier than your retirement).
Another thing I haven’t seen mentioned yet is the regulatory risk. We invest in the 3a assuming current regulations remain unchanged, taxes stay the same etc., but there’s no real guarantee about this. I assume this risk is low, but it’s still higher than just putting your money in IBKR and being able to sell at any time (e.g. before capital gain taxes would be introduced) and convert everything back to cash and invest another way.
Also, if you’re still in an early phase and haven’t really put money aside for bad times, having liquid money in IBKR rather than locked into a 3a is slightly safer since you could use it if you really have to. I think it’s fine to rely on unemployment insurance etc., it’s just that IBKR instead of 3a gets you that extra flexibility which would be fine to use if your personal circumstances are not correlated with a financial crisis (big assumption of course).