I used a work-provided Thinkpad P51 that did replace my desktop, and it was a dream to use alongside the docking station. It's no longer in my possession though, and the specs on that machine were looking a little dated. I bought the M1 Air because it was cheap and supposedly replaced some people's desktops. Even still I don't think I took a loss on it. In a few months I could probably sell it for a cool $800 and not lose terribly much of my investment.
My M1 MBA is faster than my 4790K desktop, and by a decent margin. It is fast enough that I'd be able to have it as a main computer if I needed it to be. My main PC is an 8 core Ryzen.
A decently fast laptop can definitely replace an older desktop computer without issue. When my old gaming rig died in 2017, I bought a laptop for work and plugged it in my monitors. Apart from graphics, the laptop was measurably faster on all accounts.
The only machines I've compared were my old gaming rig (with various parts bought or upgraded anywhere between 2009 to 2012-13) and my 2017 laptop. Not sure where that 3 years come from, maybe I'm misunderstanding.