I'm planning on using XIAO esp32c3's from Seeed Studio to communicate with each other with a usb C cable (they have a usb C connector). I'll have them battery powered since it is built in so not to worry about the power.
Now what I want to do is to have two of them connected per usb C cable and be able to have them communicate. Not much, only a few hex numbers.
Now I'm looking myself too if this is even possible. The usb C connectors have to be connected because they are flashed over that but I'm not sure if I can just use some data lines to send and receive data. Maybe you know this specific esp32 or maybe even how to do what I'm trying to do. So please, any help is welcome and appreciated.
If you look at the Xiao ESP32C3 examples in Arduino IDE 2.X, the one named "OnReceive_Demo" has two UART ports cross coupled to do what you want to do. You can use that to figure out how to do it between two separate boards.
I took a closer look at the Xiao ESP32C3 and I see now that it has direct USB input to the ESP module. That means that a USB-C to C connection will require some negotiation between the two boards to establish how to handle power to the ports, etc. Not as simple as the example sketch which uses a couple of pins configured as RX/TX.
So to answer your question, "probably" but not as easily as I thought. It would be much easier to use Serial1 and communicate between normal UART ports.
I blame my overenthusiastic response on a giant Dairy Queen Reese's Peanut Butter Cup Blizzard. Sorry.