For a private owner, yes: if purchase and sale are more than ten years apart, the gain on German property is not taxed in Germany, for residents and non-residents alike (§ 23(1) sentence 1 no. 1 EStG). A GmbH has no such period: its gain on a sale is always taxed at company level, and an exit through a share sale is taxed under its own rules. Exemption in Germany is not exemption in the seller's country of residence.
What to check:
• the dates of the notarised purchase and sale contracts, and whether more than ten years lie between them;
• how many properties you have sold, or plan to sell, within five years;
• who owns the property — you personally or a GmbH — and what share of the capital you hold;
• the depreciation claimed during ownership: on a sale within the period, it raises the taxable gain;
• how your country of residence taxes the gain, and which method of relieving double taxation its treaty with Germany provides.