The hole on the bottom of your box is not insulated.
Your live wire and others are going there. If maybe by vibration wires start to scratch on that hole, you can have your box on power. It must be insulated.
Simple by taking a piece of rubber hose, cut it half and slide over metal.
The life wire is coming in and first passes a transformer before ending up on rail.
It means there is always power on the rail and only goes off somewhere else!
The rail has always power on it, not handy, safe. Live wire FIRST to switch.
Maybe at one time, you forget your wiring and you THINK all is off and you ll have the surprise of your life, maybe last one ever.
Note the clamps are not insulated, most all other ones are. And that is the LIVE wire.
Your ground wire to rod looks very small, the thicker , the better.
I guess you put the groundwire of the box, screw on rail, down as better space between live wire? As long as that screw is making good contact with box. Would have taken the upper, less wiring in box.
Your box is metal and need to be grounded.
I would have taken, the now ground block, as feed for live. Then connect RCBO's live on it and also the surge. No double connections, all their separate lines. For ground buy new block and connect them on there. Ofcourse insulated or you must fix it tight on box, however Thailand and little screws. Well maybe tiny self tappers.
Crossy showed a detector, however weird thing. Device says 240 VAC as well in datasheet and in drawing they say 12, 20 V DC.
Relais in series with power. you have to implement a VDR, volt depending resistor. for eliminating inductive power of mechanical relais and protect output of device.
Must say they are hard to find, mostly they take action in own , measuring line and not another.