@ADGrant you are correct that Javascript runs in the interpreter, but you can also have wrapped apps on your Mac that are built with say Electron or Cordova that run Node.JS embedded in the app.
The first time I noticed the crash happening significantly on my M1 MacMini was when a wrapped Node.js app started crashing every time I tried to use it.
After a large amount of investigation my crash log on my system it clearly came down to an issue with the app using Node.JS version 14.3.0 embedded in the app. The Developer has even since confirmed that their code uses Node.js v14 and their app constantly crashes on all M1 hardware.
If you go and research
dev issues with Node.js you will find that older versions are not compatible with M1 hardware. There are some workaround, and
support for M1 hardware is available in Node.JS v16. But many devs are still using the LTS (long term support) version of Node.js (which is v14) or even older versions. Hence why I have flagged Node.JS apps or websites in many cases. Specifically many are seeing that Node.js
node-pre-gyp can't handle arm architectures properly.
There is also another issue in the use of some JavaScript libraries client side in Safari on M1 systems. There are several JavaScript libraries that get loaded by websites that are basically web apps. I'm still mapping which libraries are causing the issue, but it clearly is an JavaScript issue on M1 systems. I have even been able to crash a newer M1 iPad Pro with one of the websites (ESRI ArcGIS Online Advanced Map builder).
There are other problems as well with M1 Macs and with Big Sur. But all of my crashes and memory issues seem to be coming back to JavaScript running in Safari, or Node.JS wrapped apps. I am not seeing the same crashes of webpages in Firefox. I DON'T allow Chrome or any other Google apps on my system, so I'm not sure about that.
I'm in the process of mapping which JavaScript libraries are at the root of the problems currently. Once I've learned more I'll post again.
For reference: I'm running on a M1 MacMini with macOS 11.6 with 16GB Ram and 500GB Drive with about 100GB free. Running Safari 15.0 (was seeing crashes in v14 as well) and Firefox 92.0.1. Both without any extensions enabled.