Since it seems just about everybody who's been in or around a PhD program agrees it's a miserable institution with low chances of satisfaction, I will continue to follow the advice that it is not for me.
However, are there alternative paths to a research career? I really enjoyed being in an academic environment in undergrad and dream of working on AI/ML research in some capacity, but I'm a total outsider.
> it seems just about everybody who's been in or around a PhD program agrees it's a miserable institution
I disagree, quite strongly in fact. But my experience is not with US PhD programs, which is what discussions here often center upon.
As for working on research outside of pursuing a PhD: one option is to become a scientific programmer. Typically, you'd work on helping to execute the research, without the pressures of having to publish.
Of course, your "clients" do have that pressure, but your job typically is to Make It Happen, explain why it can't, and find crafty workarounds to Make It Sorta Happen Anyway.
Getting a PhD is hard, and it certainly does take a mental toll. Students are trying to push up against the boundaries of human knowledge to expand humanity's knowledge. That isn't easy, and because we train them to be independent researchers, much of that time is spent working on solo projects with their mentor supervising.
That said, once one has a PhD, it really opens up many exciting careers that are otherwise not attainable. If one wants to be a scientist and do research, you almost certainly need a PhD. It also gives you so much more autonomy in terms of the projects you work on rather than just being a coder working on someone else's projects. I only have one life, and we spend much of our lives working. I'd rather have the ability to control what I work on and wake up excited to get to work every day.
for yourself, write down in great detail what your dream is. What do you imagine yourself doing day-to-day? What experiences did you really enjoy?
Identify (via posting here, linkedin, discord) some people that have the sort of job you imagine and have a dialog with them. (if they are actively posting, they likely have the time to converse with you)
If your exerpience is anything like mine, you may find the activities you enjoy are a small part of the researchers jobs, which in many cases is a grant writing machine.
However, are there alternative paths to a research career? I really enjoyed being in an academic environment in undergrad and dream of working on AI/ML research in some capacity, but I'm a total outsider.