Consider now 5% deflation. We are now in the crazy situation where the actual interest is negative: you borrow $1000, and you'll have to pay negative interest: you will only have to re-imburse $950 (this is why you won't get a loan if the deflation rate is higher than the real interest rate).
You can sell your stuff now for $970. You pay back your loan of $1000, and you receive $50 (your negative interest).
Net profit, again: $20,-.
You forgot that we agreed that interest rate is 0%, so
you would have to return the same 1000$ (not 950$ as you pretend). But you can only earn 970$. In this case you incur a loss of 30$.
And then consider that you don't borrow but have $1000 as your own money. With the deflation of 5% you will get back only $970. You loss is same 30$, and in both of these cases you end up with less money than you had before.
Do you now get it?