Its really pretty far from ideal, I've tried to do that exact thing (some time in the past) and you basically need to spawn a whole new civilization and population, and then SM in some ships for them, only to delete all of that later. Its pretty jank and I never really did it again. Its clearly a pretty niche thing, but it would be a lot nicer if formally adopted into the game. The ability to abandon ship and still have an intact ship that can be fired upon (so that you dont take the personell hit), or even the ability to turn it into a remote controlled drone that can fly at a set speed so you can fire missiles on it would be a pretty nice feature. Not needed, just nice.