I started my PhD when DS was 9 months old and finished when he was 5 almost 6. I did my PhD in the Netherlands which sounds a lot like your situation in Germany -- no classes to take, a few classes to teach over the years but pretty light compared to an American TA's load, mostly just researching and writing.
What helped me: treating it as a job. It sounds self-evident, but it's not. DS went to a great daycare 3, sometimes 4 days a week. I worked 7-8 hours on those days that he went to daycare. I went into my office at the university, even if I didn't need to be there (do you have an office, or even a study carrel? If so, use it!). I was very clear with DH (who worked FT) when I needed to work evenings and weekend, which I sometimes did.
You *may* be able to do some work, as PPs have said, when your DC naps, but don't count on it. The single most important thing to getting a dissertation done is getting in outside help. We often have the idea that we can write and research while our child(ren) play nicely around our desk. Nope! You have to treat it like a job.
Don't let the (wonderful) flexibility fool you. Yes, it's good because you can be with a sick child, take him/her to appointments, etc., *but* it becomes a trap. View it like a job (and, for me, it was. I got a salary [low, but still .. . ], health insurance, pension rights, etc. Don't know how it is in Germany) and you'll finish.
The other important thing is the know that the only good dissertation is a finished dissertation. Don't let professors and whatever academic culture that surrounds you try to convince you otherwise. You're already balancing more than most of your cohort. You don't need to get your PhD with honors (if they do that in Germany?). 10 years down the line, it really won't matter, but it will matter if you never finish because you're constantly trying to perfect the !@#$%^.
You can do it! I did and lots of other women did, too. In fact, I finished on time and have been able to keep myself going in a difficult academic job market (post-docs but not tenured job in sight, alas . . . ) when many of my cohort without children haven't. Why? I was more efficient with the time I did have, viewed it as a career and a job that I needed to work out, even when I wasn't feeling passionate about the topic anymore, and dealt with things professionally instead of personally. Keep your eyes on the prize!