I have had my phone for 4.5 years. I charge it every night to 80% - I have Accubattery installed, so it pings to tell me to unplug it, and it also does a fairly decent job of measuring the capacity. I charge on a fast charger (10W) instead of the super-fast charger (18W) because that keeps the temperature from rising too much. I use the phone a fair amount, so I'm usually charging from around 50%. Therefore, the battery has had ~1600 cycles of around 30%, or 480 full cycles equivalent. The design capacity of the battery is 4000mAh, and Accubattery tells me it currently stores 3460mAh, which is 87% of the design capacity.
I therefore approve and recommend the above strategy for treating the battery to make it last longer. I also recommend Accubattery - it seems to do the job fairly well.