Esp-01 setup error while compilation

You could potentially do it with an ESP32 at a push, depending on how many needed to be inputs and how many are outputs, and whether you needed to add a GSM module as well.

It’s also quite simple to do with either an ESP8266 or ESP32 and one or two low cost MCP23017 I/O expansion boards…

However, I have to say that I question the logic of your approach.
In my experience, there are very few situations where you need a single MCU to have that many GPIOs, unless you’re going for a centralised hub topology and even then you’d be better having multiple MCUs for redundancy.
For most complex control systems, you’re better-off going for a dispersed topography, with small, relatively low powered MCUs controlling a small number of local devices/sensors.

For example, my home automation system has around 20 separate MCUs, mostly based on NodeMCUs or ESP8285 embedded devices such as Sonoff S20’s or Shelly1’s. These are all located exactly here I need them - close to the object to be controlled or in the location where data needs to be gathered. This removes the necessity to hard-wire all of these devices back to a central physical hub location, and simply requires power to be available at the location where the device is being located.
Because OTA is used, it’s very simple to update any individual device if I identify a bug, or if I want the device to work in a different way.

Also, although I want each of these devices to be individually controllable by Blynk, I don’t run Blynk code on any of these devices. Instead, I use MQTT messaging and control all of the devices from a centralised software hub which gives me the Blynk integration as well as integration with other services such as Amazon Alexa, Zigbee cloud services etc.

Pete.