While not universal, a lot of modern US munitions use polymer-bonded explosive (PBX) which is much less sensitive to accidental detonation from heat, shock, etc. so it is very unlikely to detonate from anything other than an intentional effort [1, 2]. They also use electro-mechanical fuzing systems, which are good but not great for safety, but are much better than mechanical fuzing [3]. All electric fuzing systems are the safest and are making their way into newer munitions [4].
[1] http://characterisationexplosiveweapons.org/studies/annex-e-...
[2] https://en.wikipedia.org/wiki/Polymer-bonded_explosive
[3] https://trace.tennessee.edu/cgi/viewcontent.cgi?article=2979...
[4] https://sdquebec.ca/en/news/fmu-139-db-replaces-three-legacy...