Following the horrible tragedy at Miron, where 45 Jews lost their lives in a stampede,
I wondered that large-scale religious gatherings are very indeed very frequent, especially in Hassidic communities, where tens of thousands of followers gather to celebrate various religious or personal events. I've participated in a couple of such events and I was never told about any general or event-specific Halachic precautions.
I know that there are numerous government rules and standards (for example Israeli standard ת"י 5688 - בטיחות באירועים המוניים) sanctioning such events and defining guidelines for emergency services, evacuation, etc.
Did Rabbinic authorities ever issue Psakim or Takkanot regarding observing Venishmartem in such potentially life-threatening events? Outside Israel, is there a Halachic requirement to align with the state law and to submit to the police and emergency services?
EDIT: Thanks to @Joel and @Mordechai for the fine Talmudic sources. I intended to ask about currently obligating trends in those communities or places.