This is a very fun project with a corsi-rosenthal filter (a box fan taped to a bunch of normal house filters). To control the fan, you'll have to have some fun with a relay connected to MAINS voltage -- if you dare. The salon power relay hat is a reasonable solution (just remember to get voltage up/on for fail-dead). It's possible to squeeze everything inside of those cheap lasko fans you can get, too, if you want a challenge.
Slightly easier/less mains electrical work required is to just use a smart plug of some sort, and there are multiple options you can put your own firmware on (e.g., Sonoff supports ESPHome).
One caveat about this most people don't know is that most basic fans with a fully mechanical switch always order the speeds from High to Low, so that if you for instance want to turn it on to Low you have to briefly go through High (and Medium). This is on purpose, to briefly supply higher current to the motor for it to start spinning. Some fans might not like it if you start them from an external switch in low, especially larger ones with heavier blades. This also applies to the one in the article, but you can sequence things in software if you have full control of the fan speed, too.
What's odd is that while what you describe is true for fans with a rotary mechanical switch, where you have to physically turn the contacts through "High" to get to "Low", it's also very common for fans with independent speed buttons to put the "High" button next to "Off", with "Low" furthest away. I don't know if that's just a hold-over from rotary switches because people are used to the sequence, or if there's something else mechanical going on inside the switch unit which has the same effect. And on this occasion I'm not taking mine apart to find out.