Since you are posting on HN and I'm guessing you are technically minded, you might find this really interesting: https://www.youtube.com/watch?v=Ai2HmvAXcU0 - it's a video from a documentary about the development of the Boeing 777. Specifically, the video shows a test where they bend/stress the 777 wings to the point where they actually snap.
Spoiler alert: they snap at orders of magnitude more flex than you've ever seen.
Even for very severe turbulence (like you experienced), it's very comforting for me to know (via that video evidence) that even if I haven't seen turbulence this bad, the people that made the airplane definitely thought about it.