What percentage of PhD candidates drop out in computer science?
The Times Higher Education looked at PhD completion rates in the UK. In the UK, PhD programs are nominally 3 years long, and the Times reported that, averaged across all fields, 70% of students obtain a PhD within 7 years. They predict that 80% of students who start a PhD in the UK will obtain one within 25 years. There are some data for MIT students which shows completion rates asymptote at around 80% after about 8-10 years. There is a fair amount of variability across fields in how quickly the asymptote is reached (e.g., the average PhD in Business is short compared to Medicine), but in all fields about 80% of students obtain a PhD. I was not able to find any numbers for German universities or CS specifically.

These numbers, however, leave out the substantial number of students who stick out grad school because they do not want to "fail". While trying out grad school might sound good in theory, just make sure you are the type of person willing to drop out if it is not right for you.