For the first mishap, it's kind of chicken-and-egg in terms of whether the stud(s) gave or the hub gave. Two possible scenarios come to mind from what data I gather in this thread:
1. The RR wheel had made previous contact with the wall and, while remaining intact, suffered stress damage and/or hairline fractures.
2. One or more lug nuts may have been loose when you hit the track. This creates stress on the lugs and when one gives way, the dominoes fall.
The second points to previous stress damage.
I had a similar problem with a street stock one night. I was running second when I felt a nasty vibration entering turn three followed by what felt like a tractor beam pulling me into the wall for a clip-destroying impact. The post-mortem was that the (stock) RF wheel had sheared off at the hub and went its own way. The lugs and hub were all intact. That wheel had taken an impact a week before, however, I didn't think to inspect or change it. Upgrading to aftermarket whitespoke and later racing rims along with more vigilant maintenance ended those problems. I never had that type of problem over the next eight years of racing.
What do your rules allow in terms of wheels/studs? I see you already upgraded the studs and nuts.
Those who live by the sword get shot by those who don't.