I think bro, that longest devices are those devices we dont care for.
If you care too much about baterry, it will "drain" faster, and "lose" capacity faster than usual.
Yea, i would agree that main thing which kills battery is temperature, and if you charged that 3 year phone from a computer slow charger, it means it wasnt your daily driver, and it wasnt neccesary.
So you didnt care when it reached 0%, you didnt cared about phone at all, you used it most probably for testing purposes i would guess.
And liion wear out by itself even if you dont use it, if you buy it new and fresh, and store it for 10 years, when you power it up, it will be dead long time, liion chemistry is active and can keep for 5-10 years, no matter if charging or idle, it will bubble up over time, and also if used, from temperature.
I own a new tablet (2 years old now), was amazed with battery, and tought myself (wow, how much i can do with this long lasting capacity), and i unlocked it this summer to custom ROM and full CPU speed all time, readed many books and learned from it, because of strong light in summer, screen was always near max so i can see, and i could feel a strong heat from where led is in lcd, and where CPU is, both sides were frying, i didnt holded tab in hand, i attached a mouse to it, but when i touched screen, it really felt uncomfortable for me, and could feel mild fry on my fingers (i remmember one time, i really burned my finger a little bit, i touched where CPU was), and imagine how much impact it had on my battery.
Even, most of the time, i kept plugged in, day and night, when i am not using it, i always keep it in charger, because i am lazy and dont want one more worry.
And guess what, it still goes good, but still i saw big decrease in capacity.
And i dont worry about batteryes anymore. I keep wifi always on, even when i when not in reach, i dont care, because it is much easier to just plug it in when you can, even when you wake up and see a 10% battery, it is enought to plug it in a charger, so when you go into a wc, and be ready for day, you will have 45%, enought until you go to work, then you can continue charge it. Or even better, buy a battery charger and never worry again.
It's meant to be used, and no matter what you do, it will last 5 years or a little longer, but of course best capacity is at 2 years.