In hindsight it should've been a huge red flag to me when the only "what's it like to do a Ph. D" students at the induction were comp. sci.
My advice to most people would just be "don't". My second run of advice would be "find the most boring project imaginable" since it's likely to succeed on the basis of "do a bunch of fairly predictable experiments and publish them".
This was in a proper hard engineering field though. I think in other fields can be much more likely to be things that can't really fail. For example in computer science, a lot of PhDs are just like "I implemented this thing" where there's very little risk of it simply not working.
An exception in computing is AI research where it is very much like the "try some stuff; it didn't work" experience of engineering and science research. I imagine a PhD in AI is not a fun experience...