I noticed I fell out of the "flow" a lot less on M1, because actions that took a few seconds on other machines are now instantaneous.
Regarding the Intellij Idea and Docker, my old 16GB MBP 2015 Mojave was struggling hard and getting very hot with 100K LoC project. I would definitely use the Gateway on old machine aswell.
For a more apples to apples comparison, Intel 12th gen and AMD Ryzen 6000 series would also give you a lightning fast experience comparable to your M1, especially since modern systems come with faster memory and faster storage than your 2015 machines, contributing to the perception of speed.
On my M1 Max MBP Jetbrains Rider stars in under two seconds. Loading the quite large project takes another two.
On my previous laptop, an i7 MBP, it took in the order of minutes to get Rider to the point where I could actually start writing code with codecompletion. It sounded like a jet taking off while Rider blasted all cores at max to enable the smart completions.
The M1 Max isn't even slightly warm in the same case. Haven't found out a single spot where it would've even slightly stuttered.
I also have a 16G 2015 MBP running Monterey and IntelliJ with no problem at all though.