What accounts for a good PhD experience?
I don't think I've ever met a PhD student perfectly happy with their work, but there is a clear pattern among the few I knew who were doing quite well: a good work relationship with their PhD advisor. This means:


Shared interest in the topic and shared specific goals (it seems obvious but it's not always the case, far from it)
Good communication, and especially mutual understanding on how the collaboration works:


agreement on the balance autonomy/supervision, i.e. what the PhD student is supposed to do on their own vs. what they are supposed to ask their supervisor advice for.
clear communication policy: emails or meeting, meetings frequency, open door or scheduled appointments, etc.



It's a matter of finding the right way to work together between the student and the advisor. For example some advisors expect their PhD student to be quite autonomous, others prefer to be involved in every decision; both styles can work, as long as the student and the advisor are on the same page.

There is no general objective way to evaluate a PhD in progress, this is why good communication with the PhD advisor is essential since they are the only person who can give this kind of feedback. If the relationship works smoothly, the PhD student can be confident even when problems happen and doesn't waste too much time and mental energy questioning their own work.