Advice for somebody who considers to join a PHD program in order to go to research about the possibly negative sides
There are some 2008 statistics on PhD completion at Ph. D Completion and Attrition

The ten year completion rates vary drastically by field: 62% for Chemistry but only 41% for Computer Science.

Part of the variation may be to do with the availability of attractive jobs that do not require a PhD. I personally knew at least one person who came to work for my employer as an operating systems developer after starting a Computer Science PhD and deciding it was too theoretical for his taste. He didn't need a PhD to have a successful career in his chosen field.

From reading questions here, the anecdotal evidence is that the worst pain is among those who are very strongly committed to an academic career, and therefore cannot do what the OP did, walk away "without big damage to my life, career or psychological health".

The OP, and especially the OP's friend, need to balance the problems with the joy and fun of immersion among people who share your enthusiasm for a particular field. A PhD may be the right choice for the friend, even though it was not the right choice for the OP. People are different.