Your code didn't work. I tried on stock map dea1g_1flag with max 32 bots. When it started I jumped in the hole to test, it paused for a short moment and respawned me as soldier unit (I was currently using the rocket troop)
I test again by respawning (on the ground not on a hole) and my body didn't stick. AI bodies didn't stick either.
The first code razac posted is working and it's really cool.
I might have some future warnings, as I have messed with dead body stuff before.
1) stuck bodies (that are rotating) will drop all the power ups and they cannot be dispensed by engineer or other dead bodies. This only happens when the dead body is in falling animation.
2) Too many dead bodies on the game at once will cause long pauses for spawning, and will result in spawning as the first character in selection, which happens to be "soldier" probably because the way setup_teams is designed. You can still go the CP and pick the character you want.
Edit: It also seems dead bodies continue to trigger mines.