https://www.macrotrends.net/1333/historical-gold-prices-100-...
What kind of long term are you talking about?
In a hundred years, there can be wars, reparations, and lots of damage to equity.
I think some distinction should be made on store of value (win for gold) vs asset appreciation (win for stocks), especially once you start talking about 100years.
https://en.wikipedia.org/wiki/S%26P_500#History
This is just a technicality however. In practice you have to buy stocks according to the index yourself or invest into a fund that mirrors the index for you. The secret sauce in ETFs is that algorithms do the work of the fund manager and thus reduce costs.
Germany has weird taxes. There there is a 25% tax on stock market returns. But no tax on gold sales. Nor on Bitcoin sales. Although silver is taxed.