I don't agree that solo hiking is highly unsafe. You have to think more about what can go wrong, and plan your gear and contingency plans accordingly to reduce your risk to a manageable level, but hiking solo is still probably safer than the drive to the trailhead.
Driving a car is also highly unsafe, as we can learn from traffick statistics, but is sometimes hard to avoid. It would be interesting, to find risk percentages about solo-hiking under different conditions.
In my own case, I tend to avoid solo hikes that involve significant off-trail travel (it's something I don't have extensive experience with, and it makes it harder for SAR to find me, should it come to that.) Other than that precaution, the only thing I do is leave a more detailed route description with my wife, and I don't change my route once I'm out there - again, making it easier for SAR if I do become incapacitated. I also make darned sure that I get out when I say I will, and immediately call my wife to let her know I'm out.
Many people do not have that discipline, I'm afraid. When I was younger, I have done pretty stupid things in that respect, from lack of knowledge.
But, on the trail, I don't believe it's any less safe to go solo.
Why do you think that military personel and S&R-personel are usually with a buddy on missions?
I've done it many times, and intend to in the future. I don't recommend it for first-trip beginners - but I don't think it should be prohibited, either.
Your personal life is an n=1 experiment. Is hiking unsafe, if one in ten-thousand of solo-hikers perish in their lifetime? Or one in hundred-thousand? That is pretty subjective. Maybe proper equipment and a hiking exam should be mandatory for hikers.
I strongly agree with you that a map and compass are essential - and not just for solo travel. Every group (and I'd argue that every person in a group) needs a map and compass. Electronics can fail - usually at the worst possible time (and shortly thereafter, it begins to rain.) And, it's not enough to have them: you need to know how to use them.
I hope that many younger hikers will read this discussion, and learn what I should have learned earlier.