Sounded like a possible electric pulse weapon to me.Seriously! I NJ bought a month ago.Two LOUD electrical crackle crackels preceeded a boom .It wasn’t a transformer cause my buddy heard the same thing 5 miles away.
They do testing of things at the Picatinny arsenal in Northern NJ. Years ago I worked there and they had proto-type EM rail guns that they tested (inside I think). If you are anywhere near that - you may be right!