Creating controlled RELAY switch

Hello guys,
I am new to ArduPilot and Pixhawk.
I own a PixHawk4 Mini and I would like to set at MAIN-OUT 5 as a controlable ON/OFF RELAY switch at RC8 of my Taranis QX-7.
I sought for documentation in the internet, however few things for PH4 mini were found.

Here are the docs:

Many thanks for your reply.
I am aware of the documentation.
However it does not refer Pixhawk 4 mini.
Having BRD_PWM_COUNT to 8, the first relay PIN is CAP 1, as I read in documents.
This corresponds to PWM 9.
Please correct me if I am wrong.
Since I am totally new to this stuff I would like some guidance on that.
How to set up ArduPilot.

And anything further needed in the parameter list

Thank you in advance.

Page down to GPIO’s
Pixhawk4 Mini