The equivalent to rental income is "with dividends reinvested". Dividends are the cash flows from owning a stock, just like rent is the cash flow from housing. So the 10x capital appreciation from housing is equivalent to the 37x capital appreciation from the S&P 500.
You and anovikov reach different conclusions because you're looking at different time scales. You're citing returns from 1870-2015; he's citing returns for the last 40 years, 1980-2020. The comment and paper you linked itself explains why: housing and equity returns were very comparable from the period 1870-1945, but equities significantly outperformed from 1945-present. I would bet on suburbanization as the cause: the U.S. embarked on a massive homebuilding project from 1945-2000, which kept supply high and prices relatively low during that period. Returns to housing since 2009 (when the bottom fell out of the homebuilding market) have much more closely matched equities.