Be careful regarding taxes and "Betriebsstätten". If you are living in Germany and your company management is mainly operating in Germany you are liable still for local taxes ("Hinzurechnungsbesteuerung"). There are also special rules depending on how much of the company stock you own. Also you may have to register a "Gewerbe" in certain cases if you are doing business in Germany (e.g. selling something) from a foreign entity.
So in a bad case as majority owner you will then have to do the taxes and other admin topics in the country of your company AND in Germany and you'll always have a special relationship with a curious tax office.
So the only way to have really a startup in a non-German jurisdiction is to make sure that your management decisions (and usually also some infrastructure) is set up there.