This already exists:
https://www.geekwrapped.com/guides/best-electronic-ear-muffs
The utility is limited by the limitations of passive noise attenuation devices. These things are great for the shooting range, because bringing gunfire down to a level that won't damage your hearing is pretty easy. There's no kind of earphones that can just completely block out all sound, though.