What is the Lender exactly in your scenario? Is he able to "print money" (or in more general terms, create value from thin air)? Because your calculations make me think he is.
Technically, in today's world, there exists a privilege/license to essentially create money-from-nothing. It has its origins, long ago, in the form of 'receipts' which could redeem gold at goldsmiths. The method has evolved into the form that it is today, however, money can no longer redeem gold.
Did you adjust for the inflation caused by injecting additional money into the system?...
"Inflation" and "Price-Inflation" must be treated/thought of separately.
Currently, DEflation is the primary driving force behind Price-Inflation. As debt (including interest) is paid off, more money needs to be 'injected' into the economy to replace the money, returning to the original Lender, which is used to repay debt.
This 'new' money, being injected, via loans, into the economy is known as 'inflation', however, it artificially creates 'de'flation simultaneously because of the >100% debt that is immediately attached to it.
There is a time delay. Without that delay, every market dependent on money would crash instantly. It would fail before it could start. But because of the delay, the name for these inevitable failures are referred to as a 'recession'/'depression'/'crisis'. In actuality, these are "delays" of deflation that are beginning to shorten too quickly. This is a problem rarely talked about openly (the reasons for which are controversial).
...Or do you have a theory on how to prevent that effect
"Supply and Demand" naturally determines the price of resources, goods and services. 'Money' is an excellent means of making trade as efficient as possible. Money (currently) is continuously 'devalued' over time because of deflation. Deflation can be just as disruptive as hyper-inflation.
When deflation is greater than inflation, it affects everything from its point of origin outwards in a negative way.
the rich becoming richer and the poor becoming poorer...
There will always be some who are richer and some who are poorer. I attribute that to multi-generational planning.
My interest 'here' is only to achieve economic stability. To ease economic woes. To promote automation without displacing people financially.
we're a debt-based economy.
our current financial system needs to go.
A "debt-based economy" would seem like a very tough sell (from my POV), but the majority of the public have been sold on this very bad idea. We are far beyond the opportunity for a fresh start since the system is now so entrenched. It's a difficult 'spell' to break. The only solution is renegotiation.