the one thing I see interfering with a possible solution is sadly the origin characters idea that they are both companions and pseudo player characters storywise, this prevents them from just functioning as companions to player characters fully and allows for incredibly weird out of character dialogue options when playing as them thus not fully fulfilling both roles, the reason why? because otherwise these companion characters could just function as companion characters and circumvent the party limit by adding them as a minion type to the party rather than take a player character slot, there is plenty functionality at the moment for a party of 8 and bigger if you find the spider egg and pop it open you get to command up to 5 spiders (so much for the 1 creature summon limit lol) but the pathfinding and AI while following is incredibly wonky at the moment, however this does mean that technology wise we do not have to be limited to only 4 characters in a party,
this is however only if the things in your party are pure companions and not their own player characters in the story on their own, you see when you have 4 players doing co-op and all pick an origin character you now have a full party, if 4 players pick custom characters and no origin character there is now 0 room for any companion storyline of any kind thus the players are quite literally just being deprived of 4 companion characters worth of story/writing/voice acting/ having to consider their approval etc, this means that storywise you're now missing a gith unless a player made one as their char, if the companion characters were pure companion characters they would still be able to join up with the party storywise.
Knowing how the DMG has whole adjustments based on the # of player characters in the party it seems doable to add scaling mechanics for monster CR/abilities etc based on the #of controllable player characters + companions in use.
I mean this is how NWN handled its co-op adjustments iirc tho its implementation admittedly was rather wonky.