I eventually got the M1 Air for serious ocaml and rust development and found it would get quite toasty (tho never concerning) during big compile/test cycles, but generally only over several dozen seconds of full load.
I upgraded to a 14” pro with an M2 Max and am reasonably happy with it and think it was an important upgrade for my productivity. In daily use, fans kick in rarely but when needed for a speciality job like TLA model checking, they can reject a lot of heat (= performance margin). Of course it would be nice if it weighed less (mine is 1.8kg after including a case), but as a side benefit the machine can play games (even emulated x86 ones inside Parallels!) so it’s hard to say I’m worse off than my previous status quo of VSCode remoting into my big Linux desktop :)
I also do a lot of AI + Audio stuff, and it gets somewhat warm but not as much as when compiling heavy stuff.