Nope, you literally have it backwards. No wonder you've got this all wrong.
If your money increases in value at a 5% rate (deflating), and a share of stock also increases in value at a 5% rate, then there's no reason to exchange your money for the stock. The stock needs to increase in value at a higher rate in order to make it worthwhile to give up the currency and possess the stock instead.
Inflation is opposite. For example, if your money is decreasing in value at a 2% rate (inflating), the stock doesn't even need to increase in value for it to be better. It would be worthwhile to exchange the money for the stock even if it was just holding a stable constant value.
Which is riskier, a stock that has a potential return of +5% or a stock that holds a stable value?
Rate of return needs to beat/outpace deflation. Technically you're half right, because rate of return ALSO needs to beat inflation, it's just easier to do because inflation is negative, so even investments that don't grow and just hold a stable value beat inflation. Which is why inflation encourages investment and stimulates and grows the economy.
As promised:
Inflationary currency motivates investment and consumption. When your money is going to lose some value anyway, you might as well take a risk and invest it for a potential reward. You might as well make that large purchase today, because your money will buy a little less tomorrow. This is healthy for the economy.
You are correct that deflation adds on top of interest, which makes loans more expensive. This stifles an economy by decreasing demand/consumption and the flow of money through the economy. When loans are more expensive to pay back, people are discouraged from taking a business loan and starting a new business or taking out a loan and investing it or using it to make a large purchase. This is bad for the economy.