ESP32 with CCS811: i2cCheckLineState(): invalid state sda(21)=1, scl(22)=1

Can you show what exact board you have there? Because there are RESET and ADDR pins on that chip that might be important.

Also have you tried another, preferrably 3.3V Arduino device like an ESP8266, with the standard I2C scanner sketch (yours has some stuff regarding EEPROMs inside), in case it’s something related to the I2C implementation in the Arduino core?

I don’t see a problem with the circuit per-sé. Doing WAK → GND should also be okay, although the datasheet at page 17 recommends connecting it to a GPIO pin while pulling it up with 4.7kOhms to do a software reset of the chip by pulsing LOW->HIGH->LOW and waiting a bit. I2C pullups also look sensible.