Li Shenron
Legend
Pets are not hugely difficult to implement. Squires are much, much more difficult.
They are both impossible to implement, unless you force a specific way to run them. But you can be pretty sure that whatever way you force, the same players who so desperately wanted a pet class in the first place will now complain that they can't use it in a different way.
For example, in 5e we have the Retainers feature for the Noble(Knight) background. Here a "non-combat, non-adventuring" way to run these characters is forced, with additional requirement about not mistreating them. And by the way, this is already a not bad idea for representing a squire.
The Battlemaster "pet" is mostly designed with combat in mind (although it clearly also allows out-of-combat uses), but it is forced to take actions in a way that is coordinated with the PC.
I have never seen the latter in practice, but I think it works, as long as the player accepts the forced restrictions as a sort of deal to make it work reasonably, and in fact we immediately got lots of players who complained about it, because they don't accept the deal.
Familiars (and those enhanced by Pact of the Chain) are even more restricted IIRC.
The general problem is that most players expect to be a lot more free in their "usage" of a pet or companion, but at the same time most DMs want to keep their narrative sensible in all situations, so they might not accept their side of the deal (such as handwaving problems on whether the pet/companion would accompany the PC anywhere, irregardless to its nature).
So for a general, all-encompassing, full-freedom solution, only an NPC would do.