I did all of that on an M1 MacBook Air and now on a M2 without any problems whatsoever. Only caveat the Airs have is that you can't attach more than one external screen without some workarounds[1]. If you don't rely on that the machine should be more than capable of what you're looking for!
Yes. I usually change laptops once every say 6-7 years. This is why four years ago I decided to buy a maxed-out 16" MacBook Pro with 64GB so that it should keep me for at least 8 years or more.
>I don't see how more ram would extend the lifetime? Isn't there other factors that matter more?
Because RAM is the hard cap (if you ignore SWAP) while here's infinite number of CPU cycles. With a slow CPU things will just take a bit longer, but with not enough RAM then that's it, it's game over for your workloads (again if you ignore SWAP which I don't want to rely on, especially on a system where SSD is soldered).
I use Docker with multiple containers running almost all the time. Local PostgreSQL and MySQL.
I use from time to time Affinity Photo and Affinity Designer.
I mostly use now VScode, sometimes Rubymine.
Video calls: Mostly Zoom, some Google Meet, rarely something else.