Not being condemning, just viewing this from a dispassionate perspective.
Was there much quality in all that quantity? Might not have been conducive to being able to make a quality choice for a wife. So, I don't see it as punishment, but not having had to tools to make an accurate assessment of her character based on her consistent behaviors, or knowing how to identify and appropriately respond to red flags (that is, to self-protect and run when red flag comes up, which is why victims often blame themselves, much as you're doing, I think).
Does that make sense?
We can't know what we don't know, and it doesn't sound like you got or developed the tools to know, and unless one needs them, they usually don't come naturally, one figures out after the fact, "This is what I need to prevent that happening again." Environment also plays a huge role, such as parents who are good role models, or surrounding oneself with people who are.
It's hard to heal, grow, or move forward from a place of condemnation. The karma idea sounds like self-condemnation.
From a Buddhist perspective, karma is the result of volitional action. It is a seed that will sprout when the conditions support it, but it has to be a logical result. Good seeds lead to good results and vice-versa. It's not punishment or reward, but logical consequences. It's not a logical consequence that you're being punished with the wife you chose. It's more logical that you yourself were sown in unsupportive conditions in childhood. But once one learns and wants their conditions to change, they have the volition to sow good seeds that, when the conditions are favorable, will be likely to garner good results.
Just my opinions and perspective, which are limited.