Unless explicitly negotiated by both ends, every USB-C charger outputs the same boring 5 volts as classic USB, so the headphones should charge just fine.
The only time things break is when you attach a broken charger that outputs 9 volts onto a wire that's supposed to be doing 2 volt signals.
In fact, I am doing it right now.
Output on the adapter reads: [email protected]/[email protected]
The switch dock demands 39 watts, which implies 15 volts, but the switch itself will negotiate any voltage when standalone.
That should be fine. There's a protocol for the charger and the device to communicate and decide what power to charge at.
Also some devices don't support anything else but USB-A to C cable that comes in a box. That's why I returned JBL Charge 4 and got Anker Soundcore Motion+. Much crispier stereo sound at expense of some base.
Unfortunately a lot of devices are out of spec like the Nintendo switch which can be damaged by an in spec charger.