Train them to not be scared of loud noises when they're young!
I'll share a cute story with you guys.
I trained my dog to like thunderstorms. When she was a puppy I got one of those big metal sheets and had my sister wiggle it while we played fetch outside a few times to make her associate the sound with happy things. Then when she had her first actual thunderstorm, I made sure we were playing fetch before it started thundering and got really excited whenever it thundered like it was the best thing in the world lol. Good news is she's not afraid of thunder. Bad news is now every time there's a storm she wants to go outside and play fetch in the rain!
Now, it didn't involve fireworks but the main point was training your dog to be comfortable around sudden loud noises just like hunting dogs are. This probably won't work if your dog is no longer a puppy tho.
I didn't get to talk about this in my previous post but you could sedate your dog with medication.
Benadryl does not work on every dog, just like it doesn't work for every human. Have a backup plan. There are many different meds that really help take the edge off and can make this a stress free holiday for both your pet and family. Thunder shirt is a wonderful tool but does not work for everyone.
If you are planning on using medication (that your vet prescribed, not your neighbors mechanic) that helps calm/sedate, do not use it for the first time on the 4th. Do a trial run, when you are home and your vet is open. If they do not respond to the meds you need to know before the 4th. If they have a reaction; which is rare, but possible, you don't want to end up at an emergency vet.
You can buy some dog ear muffs which i'm told work fairly decently. I've never used them myself but there you go.
Again, last but not least, have your dog micro chipped! Tags and collars come off easily and is a cheap investment when it means getting your dog back.