I've also found the Raspberry RP2040 to be a very good option for low-cost micro-controller development (also comes with optional Wi-Fi support, so can be used for ESP32-esque IoT based operations). The datasheet and board development documents are extremely detailed, and it is a first-class target for CircuitPython and Arduino-based development.
The programmable state machine / PIO functionality is a feature that particularly stands out to me. You get some of the functionality of the FPGA (albeit extremely limited by comparison to actual FPGAs) at a fraction of the cost.