Possible to change supervisor for Ph.D defense in Germany?
Most universities that I'm familiar with require an enrollment period of at least one year for doctoral students. Many additionally stipulate that this be an "on-campus" residency—that is, you can't be working offsite for a company or at another school. 

So you definitely need to check the regulations of anyone who would agree in principle to such a deal.

However, it is also worth considering the possibility that such a situation is one that a lot of faculty members would be reluctant to agree to participate in. Part of the reason for this is optics: they don't want to be seen as having "poached" another professor's graduate student, even if the reasons for doing so were benevolent. They may agree to a "co-supervision" situation instead, since that doesn't quite come across as badly.