This is a problem for all assets, not just primary residences.
> I think we need to stop providing incentives for housing prices to go up.
While true, the main such incentive historically is inflation: housing prices have been growing at about the rate of inflation in the long run, averaged over the US.
Ideally, capital gains tax should be charged on gains above the rate of inflation.
So that still assumes that saving is risk-free (maybe) and the discount rate people apply to consumption is 0, right? The latter just doesn't match reality.
But it would definitely be a step up from where we are now, in theory. In practice, measuring inflation is an interesting exercise; there are multiple measures that differ quite a bit once your timescale is "decades" as it can easily be for savings and housing. And yrs, I know I said "the rate of inflation" -- I forget which measure those studies used. For housing specifically, one could use whichever inflation measure best matched housing prices in the past, I guess...
On a related note, I think we need to stop providing incentives for housing prices to go up. Municipalities could put caps on the percentage of value they'll enforce a lean on. This would reduce housing costs to the benefit of people at the bottom.