So company A paid you back your original nominal investment, which is already worth more than it was at the start, plus interest, which means that whatever they did produced a better-than-average return for them to be able to afford to repay the loan. You did something even better than just hold your money and wait without interfering—you contributed to raising the average rate of return. Resources (others' savings, as well as your own funds) were put to better use due to your wise choice of investment. Ergo, you get a higher reward than those who just passively waited for the economy to improve.
Inflationary expectations is a major driver of inflation of prices. If people expect the prices to increase, they will buy earlier. That leads to producers having pricing power, so they tend to increase prices, which leads to... higher prices, and confirms the consumer expectations.
This is also why you can't really use money supply as a measure of inflation. As you note "money is just a stand-in for other goods" - which of course leads to the standard definition of inflation. If money is a stand-in for other goods, then we measure how much of these good money can buy. That's exactly what the standard definition of inflation captures.
Which is completely useless if you don't take into account how much money people have to buy things with. What you want is a metric of prices vs. wages, which neither version of inflation takes into account. Money supply inflation would be a better predictor of prices vs. wages, however, since when the money supply is inflated prices tend to rise faster than wages (and vice-versa). Price inflation is a lagging indicator which incorporates a bunch of noise along with the delayed signal, especially when the supply is deliberately manipulated to achieve specific CPI targets.
I could have it both ways. I could lend the dollar to A, and get paid back a decade later with interest. Now I have (more than) a dollar after the decade. But that dollar is still worth 1/2000 of the year's output, so I also got paid for everyone else's gains, even when I didn't leave them the resources (because A had the resources, because I lent the dollar to A).
Even within your perspective, I have a hard time seeing how that would be considered just.