Sounds like "A Taste of Armageddon"[1], a Star Trek episode where neighboring warring planets decide to wage simulated war in order to spare expensive real infrastructure. Except in this imagination, the people declared "dead" were required to report to disintegration chambers within 24 hours.
[1] https://en.wikipedia.org/wiki/A_Taste_of_Armageddon