There's a lot of talk about inflation and its causes. Is it corporate greed? Supply chain issues? One clear base cause of inflation less talked about is having an inflationary currency supply. Any other inflation caused by supply chain issues, corporate greed, lack of market competition, etc is just added on top of that. Fiat inflationary currency is a rather new invention in terms of the human timeline. In the US, Nixon is the start of it. Central banks aim for 2-3% inflation in "good years". The money supply expands, the portion of that supply a single dollar represents, and therefore its value, decreases. This isn't a conspiracy, it's government policy, and both parties gleefully support it because it benefits their rich donors.
Think of it: in the last 50 years, everything has gotten cheaper to produce thanks to increasing mechanization, outsourcing to cheap labor/low regulation countries, and extremely efficient supply chains. Yet so many things "cost more" than they did 50 years ago. Even basics like bread. What used to be 5c in the US in the 50s now costs $5.00. How is that the case? Shouldn't it cost less? Where is that "extra efficiency" going if not to lower prices? The answer: bread is the same value it's always been, the money has gotten less valuable. This is how they keep working class people running on a treadmill, never able to achieve economic mobility.
Inflationary currency devalues the currency you worked hard to earn by increasing the supply. It hits the middle class the worst because they have more of their net wealth in cash, often in the form of emergency funds, savings, and putting together enough money for a down payment on a home. Rich people have their money in assets which aren't harmed by currency inflation. Actually, even worse, it inflates the value of those assets! If the dollar loses value (all other things being equal), it takes more dollar to buy a share in Amazon, just like it takes more dollars to buy a loaf of bread. Poor people live hand to mouth, so their net wealth is not impacted much, but inflationary currency prevents them from saving and "moving up". If you want to identify the causes of increasing wealth disparity, the inability of people to save money and theft of value from the middle class via money supply expansion is a major one.
I'm not sure how you're putting the numbers together. You'd be right if ROI already accounted for inflation, but it generally doesn't.