ESP8266 came out 2014, around the same time as the first Pi, besides the myriad of wifi enabled uc options before that. First Arduino (let's say for ease of use) with wifi built in was 2013.
Lmao people already getting mad. It's honestly just way simpler doing something like that with a microcontroller/realtime rather than a pi running all sorts of processes/reboots/sd card issues etc.