The way you solve the death risk is not by making resurrection easy, it is by making the animal strong enough to not die significantly more often than any other party member.
Okay, let's break this out.
In 5e, I expect that characters:
Can get knocked unconscious, but have death saves so they don't die immediately.
If they do die and a character with the correct resurrection magic (specifically Revivify) is around, they are back up quickly.
What I get from that is the 5e experience says that there should be easy resurrection magic, just at a resource cost. I have to disagree with the idea of no easy resurrection magic.
Asking for something that's around all the time without that is basically asking for something tougher than a normal PC.
I present then: a tough-ish pet, with death saves, and the ranger having access to resurrection magic but not expecting to use it every day, seems like it's on 5e paradigm. With the ranger + pet being a strong combination (>1) and the ranger or pet having times when it's unconscious (<1) that average out together to be around the same as another character (=1 over time). (Well, actually better since that's HP damage not done to others in the party.)
Would that satisfy you? And if not can you say why not without just "obviously it needs to be stronger".