Alternative POV: that's the worst time. At those moments, the person is unlikely to be very receptive. They'll see it as proof that you are a bitter, vengeful person not worth listening to. Yes, that would a bit hypocritical of them, but that's humanity for you. That hardens people, leading to exactly the kind of cold-hearted comments the original commenter was talking about. Also, you will have foregone an opportunity to show contrast with a better way of being around other people. Lead by example, and all that.
I suggest that the best time is a while after such an event, when they have recovered from it but it's still fresh in their memory. While they're feeling good about having received help, that's a good time to remind them that giving help also feels good. I've seen people's attitudes get turned around by that, vs. never by forsaking them in an hour of need.
Else many will often brush it off and reboot the "jerk" act when they've recovered.
Especially if they feel entitled to the help and compassion shown to them when they're down, and it helps them recover faster and scratch free (and thus makes the falling down less impactful). In that case they end up still not valuing said help and compassion (because for them it was on full and easy supply).
Feel free after to make the point that normally such help should be given cheerfully, or different types of help they can pay forward.
I think the best time to remind those kind of people of this, is when they get fucked over themselves at some point.
Kind of telling them "Just shut up and cope doesn't feel so good when shit happens to you now does it? Nanananana"