This is a question about a short story I read in Norwegian back in the day, in a kind of (monthly? quarterly?) youths' anthology (not a sci-fi anthology, but a collection of youth-related topics; peer pressure, menstruation, eating disorders, that kind of thing also definitely figured in the same series, or even zine) ca. 1990. Or, at least I think it was in Norwegian. I honestly couldn't remember at this point.
The story was about a planet-spanning civilization with colonies on at least the Moon, where a population-wide crime deterrent existed in the form of a capsule of hydrogen cyanide implanted in the base of every citizen's skull. They could be activated at will by the governing body to terminate a citizen in response to criminal activity.
The wife of the main character was terminated by this means in response for exceeding her quota on import of 'Moonshine' following a trip to the moon. Possibly the main character's children had similar fates, leading the main character to decide to turn the system on its creators and wipe out everyone with the countermeasure with some clever hacking.
The story ends, as far as I remember, with the main character/narrator getting in the bath with a glass of wine waiting for the end to come.