There are stupendously powerful $1 microcontrollers now, including the RP2040 (dual core cortex m0+ with 264KB ram on the chip), ESP32-S2 (Espressif core with 400k of ram and wifi), and ESP32-C3 with wifi and RISC-V core and again something like 400k of ram.
Jay Carlson also has a series about microcontrollers as cheap as THREE CENTS, i.e. the famous Padauk 3 cent MCU:
https://jaycarlson.net/2019/09/06/whats-up-with-these-3-cent...