I always carry a hanger. I gave away the one for the YT Capra when I sold it (seemed the decent thing to do) and I have one for my Whyte T130 and now my Focus Jam2. I carry them in my pack, although now I think about it, I should remove the one for the Whyte as I doubt I will ever ride the bike again.
I carry the bent hanger and retaining nut from my first ESommet in my hotlaps gripper bag.
The original hanger wasn't bent while riding. it was bent in transit between CRC and here on it's warranty holidays.
so I straightened it and ordered a replacement.
I tend not to twat my mech off stuff and haven't bent/broken a hanger in over 10 years and probably 50000+ miles.
Crashes do happen though so you never know.
Yup have always carried a spare for my Kona, and now carry a Focus ebike one on rides.
A few months ago was out on my wife’s Jam² and the rear mech got munched in spokes and tore off hanger. I hadn’t never realised then bolt holding mech on had worked loose And it swung Into spokes when I landed a jump..
Fixed it and got spare hanger, and soon after got myself a Sam² to avoid trashing her bike again