We have a bit of a problem here, a kind of double-bind. If I understand correctly, your wife did not make it clear what the problem was, then she let it fester, then when she couldn't take it anymore she lashed out at the kid without explanation, and you only discovered what the problem was much later. All of these are terrible, so while I'm inclined to have some sympathy for your wife due to her condition, the amount of sympathy I'm extending is really tiny.
I have hyperacusis, so I can see what you mean. Basically, loud noises really hurt and give me tinnitus. This does cause some interpersonal issues, so here are my solutions.
I own rentals, so I do a lot of renovation, so I got some 3M Peltor earmuffs from the "Hunting & Shooting" category. These have a microphone and amplifier with an automatic volume limiter that turns it down when the noise is loud. They don't feel "muffled" like normal earmuffs which will drive you nuts after a while (it gets annoying to hear just one's own heartbeat and breathing and nothing else). They allow you to hear everything, and not be isolated in a bubble.
Of course they're a bit inconvenient and look silly, but it's possible to have a normal conversation with someone in the next room, even when a contractor has succumbed to the recent fashion of using impact drivers for everything up to the tiniest screw. There's a jack input so you can even listen to music while drilling.
After I got these for work, I discovered they also work great on screaming kids, barking dogs, inside a noisy car, when banging dishes, etc. I'd recommend you gift some of these to your wife, it should dramatically improve her mood.
- Understand the problem better
It turns out that the accumulation of loud noises makes them much worse. So I eliminated most sources I had control over. Here's one example: doing the dishes and eating was a problem, due to dishes and cutlery banging against each other. I just put all the ceramic plates in a box and bought plastic ones instead. That completely removed the issue and the source of conflict. Plastic plates are much more convenient and less annoying for everyone than asking people to not make noise while eating. I also got a much quieter vacuum cleaner. In the same spirit, if you both work at removing avoidable sources of loud noises, your wife's background level of migraine and crankiness should improve.
- Fix the problem at the source
I discovered my ear problem was due to inflammation in my jaw joint, which I managed to almost completely fix by changing sleeping position. I'm not suggesting your wife has the same problem as I do, rather I'm suggesting to seriously look into it, research it, motivate her to seek medical help, perhaps she'll find something to mitigate the root cause of the issue.
In order to avoid having to put my foot down and keep things smooth, I explain the situation as clearly as possible and I make sure people understand, because my condition is a bit unusual, so I can't expect people to know about it. Some take more explaining than others, but most people are fine with it. Basically all I'm asking is for them to warn me before they do something loud, so I can put on the earmuffs. It's annoying for everyone, and I would rather not have to do it, but that's the way things are.
Your wife should definitely have explained this preemptively instead of slapping your daughter without explanation, which is a huge red flag.
Now, there is a big difference between kids and adults. Adults have responsibility, kids do not. So when kids are playing, which is always going to result in much screaming, I just put my earmuffs preemptively, and everything's fine.
Now, it rarely occurs that some people either insist on not getting it, make fun of it, or tell me it's not that bad, suck it up, etc. So, in this case, if possible I simply leave and cut them off. If they're working for me, I fire them. Likewise if I have other means of applying pressure at my disposal, I will use that. Otherwise, I just drop them with a punch and deliver a lecture on solipsism and the subjectivity of pain, and tell them it's not that bad, suck it up, etc. I've had great success with this method, and the problem is pretty much solved. Obviously, I really hope I won't have to explain why this should not be done to kids.
So, basically, the problem is that your wife hitting the kid is abuse, but telling her to suck it up is also abuse. That's hwy I'm suggesting to solve the problem at the source. If your wife cannot stand the sound of your daughter crying, first thing you should do is get her some hunting & shooting earmuffs with volume limiter, make sure she knows how to use them, and make sure she uses them when the situation occurs. I hope your daughter does not cry that often, so, if your wife also gets migraines from other loud stuff like vacuuming or doing the dishes, that would be a good occasion to sneakily introduce the earmuffs in a context where no-one will see her wearing them (if she worries about looking silly). If that works out, then all is well.