If you can afford it go 24 or 32. I bought a M2 mini with 16 2 weeks ago. It's very good at memory compression making more fit into less ram. But I already had one application (mind, a game) allocate like 7.8 G of ram and then swap file usage goes up and up. It even killed my game once because it was out of memory.I have 16 GM ram on my fully spec 2018 mini and it's getting a bit sluggish which is why k figured just going to M2 and more RAM (24) with 1-2 TB will be a good upgrade as long as the 5k screens are fine and cause no problems (just because Apple says it's fine doesn't mean it is-ahem Bluetooth etc)
Consider you'll never be able to add more ram, while at worst you can plug in external storage.
Incidentally, double emulation of games with wine for x86 going through Rosetta works just fine(tm). At least in what I've tried.