An interesting point. I would add that in jewish thought, punishment is never a concept of, "oh, you did something bad, now I'm going to get you back!" It is always (again, as far as I know) connected with the idea of tikkun, in one way or another - an opportunity to repair the damage done. Or, opportunities to make up for what was lost, or other opportunities missed.
Even on a simple level, things like the numerous pogroms we've suffered throughout the ages have helped us remember who we are, have stopped us from forgetting. Depending on your perspective, that's either a horrible punishment, or a true kindness. Without that, we might have been completely lost.
As an aside, regarding the issue of r' akiva's students and the second beis hamikdash, many discuss the idea that issues bein adam l'chaveiro are generally the earliest symptoms of a deep disconnection with spirituality and god in general. And galus does help with that, r' desller discusses this extensively (he connects it with the idea of being a giver/taker, it comes up in his piece on succos, among other times).