Why yes a ESP32 can do that, and you get to play with a another cheap stack.
How about Blinking leds or a Display, or led strip... WLED and artwix have you covered!
A project like ESPresense is evolved from a PIzero project.
Let's not forget that some of the pi's appeal is that it has those GPIO headers!