How to prevent an arc when a device is plugged in
I had a very similar issue where there were a bunch of devices that could be connected and disconnected from a CAN plus 24 V power bus on the fly.  You want a cap local to the device because you can't trust the impedance of the 24 V line, but you also don't want to glitch the line and burn the connector contacts during plugging.

Here is how I dealt with this:



The 24 V from the can bus first goes thru diode D1.  While this does protect against accidental negative voltages, its main purpose is to protect the internal 24 V supply from sudden negative glitches on the 24 V bus.  This could happen, for example, if the 24 V accidentally got shorted elsewhere.  The reverse flow of current can cause trouble.

This is basically a soft-start circuit.  Q2 is the pass element that is slowly turned on to connect the internal 24V net to the external 24 V supply.  R2 turns on Q2, with D2 making sure the gate voltage stays within 12 V of the source to not hurt the FET.

When the voltage slope on 24V gets high enough, it causes enough current thru C2 to turn on Q3.  That turns on Q1, which tries to turn off the FET.  The net effect is that the rising slope of the voltage on the 24V net is limited.

The main slope-setting component is C2, which is used as a voltage slope to current converter in this case.  That current develops a voltage across R3, which is what ultimately causes the FET gate drive to be reduced.  R3 therefore also sets the slope regulation point, but keeping it at about the same as R4 is useful so that the fraction of C2 current going into the base of Q3 is negligible.  This provides reliable operation over a wide range of Q3 gains.

With the parts shown, the startup ramp takes about a couple 100 ms.  That works well in this application for the amount of capacitance on the 24V net.  There are other capacitors on that net at various points of use not shown in this schematic snippet.  No arcing can be seen when plugging the connector into P1.