I am a hiker and a ham and I disagree with this advice. I carried a ham radio while hiking for years and they were never a useful safety device. Here in the PNW, anywhere I was prominent enough to reach a repeater or another ham on the calling frequency, I also had plenty of cell signal. Whenever I was off the ridgelines and down in valleys, I wouldn’t be able to reach anyone with either method. Both cell phones and handheld ham radios are roughly line of sight, and when you are down in an uninhabited valley without cell coverage, it also quite doubtful there is another ham listening.
I swapped carrying a ham radio for a Garmin inReach a few years ago and it has been far more useful. I pay an annual service charge, but in return I can let my partner know I’m safe a few times a day, and I can use it to arrange for rides, neither of which I could do via ham. I have never had a problem getting reception, and it’s a much smaller, lighter device, and it recharges via USB so I never worry about spare batteries.
There are some ham specific activities for carrying a radio on the trail, like summits on the air, but if you are just trying to go hiking, get an inreach.