My last dog passed away in 2020. Miss that ball of energy and barrel of laughs so much. But I digress. I successfully acclimated Button to rain (which she didn't like when time to go outside for business) and thunder (which scared her as a pup under 4 mos. of age). Rat terriers are like Jack Russells in that they are relentless when they want something and LOVE playing 24/7, even more than most dogs like to eat. Her first year I had to put her dry kibble on the floor and literally flick it around with my finger to make a game of eating because her play drive just never shut down long enough to dome to her dinner bowl. And then she'd crash at 9pm.
So I decided to put the breed's limitless play drive to work for me. Everytime there was a thunderstorm, I'd take her out on the covered patio, put her in my lap up in a chair and play, play, play with her with her absolute favorite toy (a Wiggly Giggly ball). Soon she was ready to be put down on the cement slab off lap to plat fetch with WigglyGiggly. Soon I noticed she wasn't ducking with thunder cracks in a few weeks of this desensitization program at every storm we got. By the time she was a year old, she would just go out the door on her own in a storm, run around in the rain and wasn't bothered by cracks of thunder at all. She still wasn't fond of rain and would scurry back inside once she'd done her business though.
She was never around gunshots, so I honestly don't know how that would have worked out for her.
I desensitized her to getting her claws clipped/ground with an buzzing electric nail grinder in a similar manner. First I let her play with the grinder turned on , buzzing, so she could play with the main box. Then I'd touch her leg/paw with the grinding tip in a game-like manner. Then we progressed to bits of cheese or hot dog every claw I tried to grind. Eventually, she was eager to get them cut because she knew it meant treats galore. With ratties' energy level, they don't usually gain weight until much older dogs. Used the same treats approach for applying ear/face medications, which she hated. The one thing she would never EVER let me do, despite doing it from a very early age so she could get used to it, was brush her teeth. She wouldn't let us or the vet open her mouth. So we just gave up on that one and used dental chews designed to help remove tartar.
She's buried down at our BOL with a young 3' Catawba (purple) Crepe Myrtle as her grave marker. It was blooming when we went down last week.