I just made some calculations. Assuming margimal tax rate of 25%, withdrawal tax rate of 5%, 2% pension fund yield, 6% IBKR yield (pre-taxes). It makes sense to contribute more into the 2nd pillar for the first ~10 years, but afterwards you would be better off if you always invested those contributions in IBKR.
Conclusion: Increasing contribution rate or doing buy-ins makes sense if you withdraw it in the next 10 years. So either as a young adult planning to buy a property or 10 years before retirement.