You may write another thesis, however, you will not be able to be employed on a limited-time contract in this capacity again due to the Wissenschaftszeitvertragsgesetz. So doing a second PhD means doing it without any financial support (unless you are able to get a scholarship, but all funding sources I know of require that it's your first time).
ETA: Based on comments and the other answer, you may actually be allowed to continue on a limited-time contract still for 4 years plus the length of your maternity leaves. In this case it seems possible to complete another PhD in this time if you can get another position.
However, if it's only the lack of time/distraction of children that lead to your current thesis not being where you want it to be yet, it would seem more worthwhile to invest the time to improve it. Unless you have significant issues with your current advisor/lab that you didn't mention, there's no reason to think your results would suddenly be so much nicer the second time around!