The first question, I guess, would be how many years payments minimum must one make in order to receive a German payment in retirement.
I have a friend who worked as self employed for 6 or 7 years in Germany, and paid nothing into the public pension system.
They later had one year working there and paying in to the public system, left and are now back again for another year, which is likely to be the last time that they work in Germany.
Is it possible, as it is in other EU countries, to make voluntary contributions for those "missing years". Perhaps if brought up to some minimal duration, such as 10 years, a pension could be obtained.
However, some of that work was 20 years ago, so maybe it would not be possible.