Okay I just did a quick count for discussion’s sake. Note that I restricted the deaths to the crew of the Enterprise during Kirk’s 5-year mission and those we can actually verify. Therefore I cannot count the deaths of the crews of other starships such as the Intrepid, Constellation, Defiant, Exeter and Excalibur.
Also I didn’t count the deaths in WNMHGB other than the ones we actually saw because we cannot identify who the other listed casualties are. WNMHGB also complicates things because red did not yet exist as a division colour, but rather sand. Both Mitchell and Kelso were wearing sand even though they were at the helm/nav console. Do we count them as red or gold? If sand is later replaced by red then that makes them “redshirts,” but if we go by assignment later throughout TOS then they would be gold shirts. I also didn’t count the loss of Pike’s yeoman in “The Cage” who could have been wearing gold or sand.
Gold = 6
Blue = 5
Red (Engineering) = 6
Red (Security) = 17
Interesting that the number of security deaths is equivalent to deaths from all other departments combined. Yes, security looks to be a higher risk occupation, but it looks like if you’re aboard a deep space starship not being in security doesn’t make one automatically safer.
I think it’s not so much being in security per se, but actually landing party duty that puts you at greater risk. Most of the security deaths occurred planetside whereas aboard ship everyone seems to be pretty much at equal risk.