Hi Fanny, I've never thought of working towards a doctorate as a bit like writing a book! I guess it depends on the area of research or study. Do you already have a masters?
I have a science based PhD which involved many years of original research ( I also worked part time to pay my way), and eventually writing up my thesis and a viva with experts in the field. The writing up part took longer than expected but was really only a very small part of the work. It was several decades ago, before the internet could call up other peoples work so easily or computers could whizz and count so fast, so I spent a lot of time counting and measuring cells, plotting graphs, and messing with statistics - things that could be counted by machine now!
Many people do achieve PhDs whilst working part time alongside- but it was not easy. I'm rather out of date as I left academia decades ago- others will be more useful.
Good luck with whatever you decide.