Tricky.
The spectrum of small fire arms (guns & rifles) is about 150Hz to 2500Hz (with a peak SPL at 900Hz-1500Hz). This overlaps a lot of the speech spectrum. Larger weapons sit lower: below 400Hz with the bulk below 100Hz.
Passive air plugs have a distinct lowpass characteristics: good attenuation at high frequencies but much less protection at lower frequency, primarily due to residual air leaks. That's why custom fitted plugs work a lot better than "one size fits all" models.
The main problem with speech intelligibility with ear plugs is not overall level, but the titled frequency response which affects mostly consonants.
I'm guessing the ears plugs in question were designed with one side being as sealed as possible and the other with having an intentional high frequency leak to flatten out the total attenuation and get more of the plosives and fricatives. Maybe you can design this leak with a non linear behavior that closes at high levels.
Both approaches are not great: ear plugs don't do well at low frequency especially if they are not fitted and any attenuation spectrum that maintains speech intelligibility will not offer a lot of protection for against gun fire noise. I'm guessing that a fair bit of benefits of this particular plug came from a creative marketing department (which the military is surprisingly vulnerable to).
Alternatives:
Active noise cancellation can be quite good at low frequency and adaptively deal with some amount of leakage. However, they generally don't have enough output to cancel a gun shot and will simply clip.
Ear plugs alone are unlikely to give sufficient protection: the combination of over the ear protector and ear plugs is much better. The over the ear portion can have a speech detector and selectively pass sound and can also partially compensate for the frequency tilting of the passive earplug underneath.
Gun fire and explosions are insanely loud: anywhere from 130dB to 190dB. Fortunately they are also were short but some amount of damage is unavoidable. It's not just guns: the inside of a navy sea rescue helicopter with the door open is REALLY loud and I fried a few microphones on my first measurement attempts.