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.
Inflation is not purely a boon to the capitalists and rich. If you're a working class person with a student loan, or mortgage or any type of long term debt you benefit from inflation as the value of that debt goes down over time. Meanwhile if your the bank holding that debt then inflation hurts you as the bond backed by that debt will go down in value over time. So assets that are backed by loans (bonds) go down in value while assets backed by equity( % ownership in a company/stocks, real estate etc) are uneffected like you said. This is why a lot of capitalists favor static or even deflationary currency as the value of their bonds will go up while not effecting their stocks. Deflation for the poor though can result in debt traps, where the value of the debt you owe goes up over time and makes it impossible to get out of, which is great for banks, the longer your paying minimum payments and interest without touching the principle the better. This is why populists in the western u.s. demanded inflation in the late nineteenth century because they were drowning in unpayable mortgages, and the rich eastern bankers refused since they were raking in all the money from those mortgages.
Also you're putting the cart before the horse, inflation is caused by a lot of things, but one of the main causes, and the main cause in this last round, is rising wages, not some government conspiracy. If we're looking at the economy from a Marxist view that when an item is sold a certain amount of it goes to fixed costs, a certain amount goes to labor and a certain amount goes to capital. If say a toothbrush costs $5 , and $3 goes to fixed costs, $1 goes to the laborer who made it and $1 goes to the capitalist who owns it. Now say that laborer uses there new labor power obtained from unionizing or surviving a pandemic that put a lot of people out of the labor pool they can demand an increase in their wage, say to $2. This extra dollar can't come out of the fixed costs, ideally it would come out of the capitalist share, but since the capitalist controls the price they will just raise that, and maybe add bit extra. So the laborer has to deal with increased prices, so they demand more wages which creates a feedback loop leading to ever increasing inflation.
In this sense inflation is the natural result of class conflict in a capitalist system where capital controls the prices. The government in this case is usually tasked with reigning in inflation rather than creating it. Early on in the Nixon years this was done through price controls and wage controls, neither capital or labor could increase there price. Nowadays it's done through interest rates to cause or at least make people think there's a recession so that labor will stop asking for higher wages.