Is there a real reason to do this in the first place?
This is a good question. What will you get from it or why do you need to do this?
Putting that question aside, I belive you will need to
1. Determine if the Hobby Wing PB is simply a switch.
2. Power the RX from a source other than your ESC, which means a bypass harness.
3. Add what ever circuitry you need to operate the switch from a channel.
4. Verify the assumptions
Is this more than a switch?
Looking at the switch (Xerun XR8) it looks like 4 wires. 2 red, white and a black. It also has two buttons! So there's a chance it's just a switch.
Looking HW website, it has several versions of the power lead and some of them are simple SPST slide switches. Which implies there is a "master switch" at least for some of the ESCs.
https://www.hobbywingdirect.com/products/esc-switch?variant=17845690500
So this depends a bit on which Xerun ESC you have.
Into theory/guessing land here. If the PB is a momentary switch, then it may have some sort of glitch filter that requires a "long press". Meaning that connecting the two leads turns it on, but connecting and waiting is required to turn it off. Which makes sense because if the switch gets bumped it could turn off too easily. It's only a spring and a contact so a hard landing might turn off your ESC.
If that is true, then a quick short of the leads would turn it on (assuming it has power) and a long short would turn it off and a PB, switch or something else doesn't matter as long as the voltage on the other end is correct. There is a bunch of logic in the ESC that is figuring out when to "turn on" the ESC. The reality is that it's on but the micros are not. So it's probably not really off (no current draw) when it's "off".
To figure this out I would see if you can Ohm out the switch and determine the behavior. Ideally you see button push = 0Ω and button not pushed = ∞Ω.
Lets assume that's true, the next thing to do would be to probe the voltage on the switch. One side will have some voltage and the other side is most likely 0V. For the sake of argument lets call it +V. If that's the case then you can pull the ground side to +V to start the ESC and pull and hold it 5V to stop it.
What? You're connecting power and ground, that's bad?
Not really if it's what I think it is. It's likely two IOs. IO's can float and be pulled low by a resistor, which makes it a pseudo ground. If you ohm it out from the PB to ground you should see some resistance, i.e. it won't be 0Ω.
My guess is that it would look something like this.
Confirm this before and make your own analysis before you implement a new circuit.
Custom Harness
Bypassing the ESC power is probably the easiest part here. You will need an external
BEC and remove the power wire from ESC-RX cable. Leaving the ground wire technically creates a ground loop (which can be bad) but it's low speed and very noisy, so it's probably not going to do anything as nothing has a solid ground reference anyway. Leaving it makes the modification simpler because you just pop the pin on each side and snip it off, that's all.
On/Off Circuit
This is the hard part. You will need something that turns it on and off. Basically do two things pulse the 0V side for the time
Ton and the time
Toff. What that time is I don't know it might be a bit of an experiment?
As someone mentioned there are some LED controllers out there. Maybe just have it work on a remote button that sends a signal the length of you button press.
But again You need to make sure the voltages match up, there are no shorts.
Assumptions
We
made a lot of them and
they are usually not correct.
There are no guarantees that any of this will work. You will need to verify everything to make sure you don't burn something up. Modify this scheme as the information comes through.
Best of luck.