It is an interesting question. What you did not mention is what discipline you want to do a PhD in and in what country.
For instance, in the UK, PhD costs a lot of money (about £9000 per year for at least 3 years for home students and at least twice that for internationals). So, if you are paying and have done 2 years already (and spent £18000 only on fees and about the same on living costs) you are unlikely to do out.
Saying that, most people do not pay for themselves though. There are a lot of funded positions (and you will even get reasonable bursary), but they have a catch. If you are funded by the department or university, you will have to do teaching (usually, 500 hours per year, lab sessions, marking, etc). Alternatively, your position can be funded through the project grant which your supervisor has. In that case you will have to work on the project besides your PhD topic. In any case, you will effectively have two jobs.
Also, discipline do matter. I cannot say for Humanities (probably reading enormous amount of literature), but on physics, chemistry, biology you will have at least some experimental work. Some experiments are very-very long and/or require attendance over several days (including weekends). You may have some resources they require regular maintenance, e.g. mice or mosquitoes which need to be fed and cared for 7 days a week. So, in this case keeping it to 40 hours a week is virtually impossible.
In disciplines like maths, computer science, data science etc it is a bit easier. You can choose when and where you are working, but these disciplines usually involve a lot of coding, which again usually requires about 10 times more time than planned (due to code debugging).
I have done PhD in applied math, I was definitely working much less than 40 hours a week (except about 2 months during writing thesis) and still did it in less than 3 years. Yes, I was also teaching and doing actually much more than 500 hours a year (getting very generous pay for the extra hours).
In general, I would not say that normal prof will demand you to work any specific number of hours. Academia is about flexibility. Nobody cares whether you are working 1 hour a day or 20 hours a day. All people care is the results you get.
The biggest issue here is that I am afraid, you have a bit wrong attitude towards academic work in general and PhD in particular. Even if you do not actively working on something, you usually keep thinking about something ("where is the mistake?", "How to make this work?", "How to improve this?", etc). Academia is not an industrial job, it is a way of life. And PhD is not different. And you should enjoy this way of life. At the same time I should admit that I can spend a lot of time with family and maintain healthy work-life balance.
So, if you are not sure, I would suggest going to industry for several years and then decide whether you need a PhD or not. Actually, many large companies would happily fund your PhD course if you will make a compelling case that you need it to fulfill your duties better.