For people who know more about this stuff than me: are these sorts optimizations only possible because Apple controls the whole stack and can make the hardware & OS/software perfectly match up with one another or is this something that Intel can do but doesn't for some reasons (tradeoffs)?
Intel tried this with Itanium a while back and failed because it is difficult to get software developers to target a new isa and provide compilers and compiled code for everything unless you use a translation layer.
Apple is one step ahead here because their compilers already supported ARM isa (because iPhones use them) and had both the OS and apps ready to go from day one of availability.
They also had translation technology that would allow mutating x86_64 code to ARM64 code so that old apps would (on the whole) run acceptably fast on the new chip.
To do the latter properly, Apple had to create a special mode to run the arm chip with total store order for memory writes, which is not standard on arm. (It would be a lot slower if they didn’t have that when running Rosetta translated code.)
So both the OS being available, and the OS influencing the ARM tweaks (eg TSO) could they pull it off.
They also have the position that they build hardware that uses those chips so can mass produce - and in fact, replace - existing hardware.
Each of these things could be done in isolation by Intel/Windows/Apps but it would be difficult to do all three.
Even getting JavaScript maths in a special instruction was difficult enough on Intel, and that was something of benefit to any browser.
My guess is you’ll see Intel and AMD offering Arm chips in the near future, as both AWS (graviton) and Apple have shown the way to a new ARM future.