If you upgrade to 32G of RAM it costs $400, but if you upgrade to the M1 Max it costs you $500, and includes an upgrade to 32G of RAM, so if you're going with 32G of RAM anyway the Max is only $100 more.
And really if you want it to still keep you happy in 2029, you're going to want 64G of RAM.
NEVER ‘future proof’ a computer. Buy for what you need.now.,
instead, take the extra 500$ or 700$ you wasted and buy some apple shares. In 4 years, with the profit, your be able to get an upgraded new and latest computer, and you can sell your old one to come out on top.