Theres a prefab on gamebannana for that
http://tf2.gamebanana.com/prefabs/6005
What do you know. It actually works.
He's using env_entity_dissolver (it shows up as obsolete in TF2 because it's not in the FGD by default) with dissolve type 1. The env_entity_dissolver is triggered from a trigger_brush:game_playerdie, which means anytime a player dies on the map, they dissolve. So even if they use a /kill command, poof.
It doesn't trigger the cow mangler animation, but it does dissolve the ragdoll.
I'll have to play with it to see if I can get it to trigger from just the spaceship.
[Edit] Technically two env_entity_dissolver -- one for weapons (or ammo packs) with dissolve type 2 and one for tf_ragdolls with dissolve type 1. I felt obligated to edit and correct myself before BoojamSnark comes in and says, "Actually..."