According to a magazine article I read umpteen years ago, lethal radiation from the core pervades most of our
galaxy; only in small areas, clouds of
star dust provide sufficient protection to allow life to develop. However, due to the outwardly spiralling movement, at some point these protected planets will move out into the open and be galaxy-burnt to death.
Whether or not this was a new hypothesis or accepted wisdom I do not know. Your idea of an internal self-destruct mechanism is much more poetic, of course.