Using multiple ESP32 for one big network, and TCP server

I'm looking for a way to make with multiple ESP32 chips one big network where i can setup for every ESP32 chip a TCP server. So each chip will need its own IP adress.

Using one (soft) acces point won't work because not all ESP32 chips will be in the range of the acces point.

Using an mesh network could work only i tried using PainlessMesh and that isn't TCP/IP based so i didn't could get the TCP servers working. This is because of different IP ranges and i could setup a static ip. So i was only able to get data from the connect node.

Any tips and solutions are welcome.