I was talking to someone that hosts commercial-grade fireworks, every year, in his backyard.
He said the trick is to invite a couple of cops.
I remember this from the 80s. There were city-sponsored shows, or you had a cop "supervising" your neighborhood show.
The "trick" I've seen is just doing it with enough space to be safe and with property owner permission. The cops are likely caring about safety not the letter of culturally unenforceable law on July 4th. Problem is this don't work in the suburbs and cities, it's just to dense.