Not quite the same thing, as my games will last say no more than an hour or two, not days. But I will be handling this situation through bots. When a player leaves the game, their slot is controlled by a bot until a new player joins the game and then takes over from the bot.
What I haven't decided yet is how exactly to handle the timing of a bot -> player conversion (when a player arrives). For example, let's say on team Human, starship slot #35 is a bot of class Frigate. Now a new player joins and is assigned that slot. Does the player exactly and instantly take over that Frigate ship, even though they want to play a Corsair? The advantage of this approach is gameplay is perfectly seamless; ships aren't just appearing / disappearing.
The disadvantage is when players join a game, they would be forced into whatever ship was previously occupied by that slot, until they are destroyed or move back to a base where they can refit their starship and equipment. I haven't decided whether this approach makes the most sense, or instead when a player joins, the bot ship just spontaneously gets destroyed and the player can instantly start at their home base fresh. That makes it a bit more of a natural experience for the player who just joined, but it causes problems for the others (like let's say an enemy was just about to get a kill on that bot, and now it disappears and they are denied the kill) etc.