> Another problem is the constant charging and discharging of battery while connected to external power.
Is that actually the case? Anecdotally, all my devices which spend 99% of their time connected to external power show the least degradation in reported capacity and the best preservation of their original battery life. I'm talking about iPhones, macbooks and hp laptops.
For the latter, I have two basically identical ones, one for work and the other for home (same model number, same generation, same battery p/n). The home one rarely if ever runs on battery, it has something like 50 cycles in 4 years. The battery lasts pretty much as when it was new. The other runs often on battery and it only lasts half as much. I doubt it's a lemon, because it's the standard issue laptop at work, and my colleagues' are in the same boat.
My iphone 14 pro's reported battery health has also degraded much faster than my iphone 7's. I use it much more often on battery than the old one which spent 90% of its time plugged in. But since the devices are different, the comparison isn't as meaningful as with the laptops.
Some devices will notice when they've been plugged in for a very long time, and will automatically discharge the battery to 80% or so, but continue to report 100% state of charge to the user.
Chemically speaking, Li batteries do degrade much faster when kept at 100% for weeks on end compared to being stored at 50%, but not as fast as cycling it. The absolute worst case (without cycling) is being stored at 100% at warmer temperatures, like 40C. They will lose over 10% within a month in those conditions. I highly suggest a laptop cooler for any desk where you may use a laptop plugged in for extended periods.