bedir than
Full Moon Storyteller
Is a ‘pet’ nothing more than an NPC whose initiative is the same as yours, who you can allow to go before or after you?
And of animal intelligence, or lower.
I think one of the things that would help the Ranger's companions is if they "level" in similar ways to cantrips or extra attacks. This could be by adding quantity of pets at certain tiers, or powers of pets at certain tiers.
Something like (thinking as I write) a 1/4 CR at 1st level. A 1/2 CR or lower at 5th level. A 1 CR beast or 2 more 1/2 CR or lower beasts at 11th. At 17th level that could be a 3 CR beast or more small beasts. Make the 20th level capstone something like a 5 CR beast (giant croc, giant shark, some dinosaurs, mammoths) in addition to their remaining living beasts.
This could get complex for play, which in some ways incentivizes having only the single larger beast.
There should also be a mechanical incentive for the Ranger to not treat the pet like a meat soak and try to keep them alive. My homebrew has animal companions as a standard. If they perish the character attached to them take half the animal's hit points in psychic damage. For the most part the players don't have their animals enter conflict, as they don't want to lose their companion.