How to deflate USD inflation?

On the picture below prices of SP500 and Gold (rescaled) for last 90 years.

There are at least 3 types of distortions caused by inflation:

• Slow upward trend.
• Sudden jumps caused by radical changes in policy, like changing gold standard in 1933-1934.
• Smaller jumps caused by fed rate changes.

I wonder if there are ways to somehow remove those distortions and have a better and more stable measure of the price? Instead of raw USD that jumps around chaotically.

The biggest problem is that it's impossible to compare prices on long intervals. It's kinda ok to ignore inflation on interval of 1-3 years, but not 10 or 20 years.

The CPI can't be used. As CPI as a conventional measure of inflation measures something totally different. It measures price of basket. But because of the technological advance - the price of basket constantly going down. But as soon as USD falling even faster - it overtakes falling basket and we perceive the situation as if the price of basket is growing.

So, the real inflation is higher than CPI and it also has small fluctuations caused by FED rate and radical policy changes. I wonder if there are some better approaches for adjusting inflation than CPI.

Maybe something like 10 Year Treasury Rate could be used to infer the real inflation or something like that?

UPDATE:

I compared different measures of inflation:

• CPI
• Minimum wage
• Median wage
• Implicit GDP deflator

Seems like all of them are quite similar.

You can measure inflation by so-called GDP deflator. The inflation for year $$y$$ is given by formula
$$\pi_y = \frac{\text{GDP}_{nominal}}{\text{GDP}_{real}}.$$