I doubt it had much to do with 5nm node. Sure, the node helps with efficiency, but the gap is just too wide.
Apples design philosophy is very different from Intel or AMD. Apple relies on very wide execution backends and extremely large caches. They start with low power consumption and extend it to performance. Intel does it exactly the other way round.
You make it sound like "5nm" and "extremely large caches" are completely decoupled from one another. Pragmatically, the are not. Using denser fab process allows the cache size to grow larger without causes some losses in other areas. ( e.g., sacrifice core count to have larger caches with a given fixed transistor budget and die size).
Apple can in part get away with making larger caches because they are on a fab process that is denser than their competitors. When Apple's competitors can make caches of similar size than that relative advantage will erode. It won't erode to "zero value add" but it probably won't be as big of a advantage lever as it is now.
For example both AMD and Nvidia GPUs are rumors to substantively boost their L2 caches in the next gen GPUs coming at the end of the 2022. Is that going to instantly give them good iGPUs, maybe not. However, even if Apple catches the 6900/3090 AMD and Nvidia will be 'gone' from those levels.
AMD has already got 3D cache augment technology. When applied gets a decent multithread boost ( thermal constraints make that not a good single threading drag racing augment). But it is clearly illustrative that once AMD gets to put more cache on the same die with N5/N4 that will be a substantive gain.
The "5nm" plays a smaller but still contributing role in the "go super wide execution" design also. It allows provisioning extra wide units that may sit idle on long stretches of conditional and co-dependent code fragments. Some tight computation section in a long loop and it goes 'high traction'. Similar issue with the AMX units. On "Dick , Jane , Spot" normal code it does nothing. However, since have an extra large transistor budget it doesn't hurt much in trade-offs to carry it around on the die.
Therefore it is a bit of smoke that if Apple was on Intel 14nm+++ that the M1 would do what it does on TSMC N7. To hit the same fab manufacturing costs the die wouldn't be much bigger and Apple would have had to made some unit transistor budget trade offs. Would they still have the edge in some areas? Yes. Would they have all of the edge advantages they have over the AMD/Intel implementations? No. The gaps would shrink ( or grow where AMD/Intel are just throwing lots more power at higher clock speeds. )
There is no indication that Intel is any close in reaching M1 in efficiency, so unless they come out with radically new core design that takes lessons from how Apple does things I wouldn’t worry about it. Similarly, Intels fastest enthusiast CPUs are around 20% faster in single core than M1 - while consuming close to 10x power. There is not much spare room left there and it’s not a method you can utilize for laptops (and you can clearly see that premium mobile Alder Lake barely outperforms even the old M1).
But the playing field isn't just about laptops. Apple and Intel mostly sell laptops , but that isn't the whole market. Especially where "single threaded top end performance" is a strong selling point. Apple also was talking 'smack' about how they conquered desktop performance. Can't move the goal posts and crawl back into solely laptop land without a retreat there.
Putting a higher performance GPU on the same memory bus as a CPU core trying to hit "beat everybody" single threaded throughput is a dual edged sword. That is why Apple puts a bandwidth cap on the CPU cores. It is a graphical user interface operating systems so at some point the GPUs 'wins' the limited bandwidth contrast when both sides want "too much".
The GPU less AMD desktop CPUs and smallish iGPU Intel desktop product tip the 'tie breaker' in the other direction (not even possible to 'tie' in the AMD case). So if even up the fab process and level up the caches and push the GPU off the memory bus... the notion that Apple has a 'slam dunk' win there in single threaded isn't clear at all.
Large enough micro-op translation cache and take the quirks of the literal x86 opcodes off the table.
In the general desktop market it isn't likely that most of the buyers are going to be keen to throw modularity out the window for efficiency. Some of the efficiency trade-offs here are markets that Apple is tossing aside. As long as Intel and AMD are shooting at broader market coverage, they will likely continue to make different trade offs.
So yeah, first I want to see Intel getting anywhere, because so far, they are not. Alder Lake is Great of course, but it doesn’t bring any noteworthy increases in efficiency and it’s praised performance improvements boil down to the massive increase in cores which gives you good results in some popular benchmarks. If that’s where the wild is blowing, well, Apple can easily add a couple of CPU cores to the next gen and get back ahead. The real trick is getting thst kind of per-core perf at 5watts, and so far only Apple can do that.
Actually, without a much denser fab process ... no Apple can't easily add cores and hit the same price points they are now. And as long as the costs for the bleeding edge processes keep going up each generation that is a dual edge sword also. Apple is going to fight a multiple front "war". Trying to keep up with dGPUs. Trying to keep up with discrete AI/ML solutions , trying to keep up in media de/ecode ( trailing on AV1) , trying to keep up with discrete CPU packages. CPU cores may not get huge transistor budget increases in both cache and core count.
That would have been a terrible choice. Sure, sticking with Intel could give us marginally faster desktops (and even that’s not guaranteed) today. But the real strength of Apple Silicon is a new unified programming model. CPU, GPU, vector coprocessors, ML coprocessors, unified memory. Developing and testing becomes simpler and unlocks new programming paradigms.
That real strength doesn't come for 'free'. It is all integrated... but it is all fixed integrated. Again scoped down to just laptops a more reasonable trade-off than as scale up the desktop product space.
Apple Silicon is a truly heterogeneous system with multiple programmable processors thst can work in unison. Can’t really do that with x86 - yet. There are indications that they feel the pressure and want to get there.
Errr..... it isn't like Intel and AMD don't have fused on die solutions. "x86" in and of itself doesn't inhibit heterogeneous compute solutions. Neither AMD or Intel have "bet the whole farm" on it, but it isn't like they haven't worked on it. (and some of this has to do with operating support and security.... not CPU core design. )