Oh! Poor thing!
I had a dog that experienced almost the exact same thing. We took her to a fireworks display, because we were training her for service work. She hated it and never liked the lights or noise of fireworks, or even a severe thunderstorm.
But, what did help is we would enclose her in the bathroom when there were bad storms or even during firework season. This muffled the sound. I also played the radio very loudly.
I would suggest that while you are transitioning to the new apartment, that you would leave him in the crate. Yes, it is more familiar to him.
To help him with the nightly whining, I would try a weighted blanket/vest. I got mine on Amazon. But, almost all of the pet stores online sell them. Drs. Foster and Smith also sell them.
I have tried the natural pill products that have valerian and chamomille....I didn't notice any difference. However, you might try them, especially since he was so traumatized by the noise.
But, other than letting him sleep with you at night, I can only suggest trying to get him to self comfort with a weighted vest, a "lovey" (either a favorite blanket or a stuffed toy, preferably one that you have played with and has your scent on it). Some dogs will even comfort if you give them one of your old t-shirts that have your scent on them. He is scared and needs to be consoled.
If all else fails, I suggest going to a training specialist. I have used the following program. She is a vet and has a plethora of ways to avert difficult behaviors. http://212b0avhd4imbk49y4ri3y13td.hop.clickbank.net/