I've been a developer for roughly twenty years. Mostly React stuff, but I dabble in SwiftUI.
Last year I decided that my 2016 16" MBP had reached the end of the line, but the 16" M1 MBP wasn't ready yet. I decided to get the cheapest M1 Mac I could get my hands on (Macbook Air, 8gb, refurb)
It was fabulous, much faster than than my 16" MBP in every respect. I use multiple virtual machines, complex coding environments, multiple recompiles per hour… no problem. In fact, the M1 MBP I'm on right now isn't even perceptibly faster, it's mostly just a bigger nicer screen.
I suspect that the Apple silicon processors deal with RAM much more efficiently than Intel chips, and are designed around the way Darwin constructs "retain/release cycles."
I do recommend to people who use an abundance of tabs and "desktop web apps" (Slack, Discord) to go high on RAM. Personally, I'm disciplined: I've got an editor, a RAM-efficent browser (Safari), and not much else running. 8gb was plenty.