The dog started barking after the thief had left the place six months ago [duplicate]
A couple of phrases come to mind to capture the idea of ineffective actions that happen long after a time when they could have been useful:
Too little, too late - this suggests that someone's efforts are halfhearted and not timely enough to be of any practical use. Their effort is not sufficient to accomplish anything (too little), and it's happening after a time when it might have helped (too late).
A day late and a dollar short - this also suggests that a person is too late and ill-equipped for some particular task or event. There's a slight connotation of lack of intention here, as the person may be surprised to find that they are too late/ill-equipped.
It's a bit like: "trying to close the stable door after the horse has bolted."
This expresses a similar sentiment; the action of the individual is appropriate, just not at the right time.
This idiom is independent of the risk or danger associated with the event; it could apply equally to something annoying or life-threatening.