Best way to run a sequence of arming commands?

I’m building an ROV with BlueROV electronics but with much larger thrusters. In order to prolong the life of the main contactor for the motor controllers I have a pre-charge circuit filling the controller capacitors before the main switch goes on. These are both run by RELAYn pins configured on the pixhawk aux channels.
My question is what is the easiest way to run a sequence of commands to arm the motors which calls one relay, waits for a period of time (or an analog value), then turns on the second relay.

So far I have been able to keep everything run under QGC rather than pymavlink and am hoping to find a way to do something like use a joystick button to initiate a script. Is this wishful thinking?

Incidentally, is there any way to add or configure UI buttons to QGC without rebuilding it?
Thanks in advance for any ideas.