Edit #2: In this video by Tesla he demonstrates setting Render Custom Depth in a blueprint. He does it on a static mesh but you should be able to do it on any skeletal mesh the same way.
Edit: I reread your question and I misunderstood it initially. He does say in C++ you can toggle Render Custom Depth but I’m not sure how to do it in a blueprint either, nor how you would change the outline color per actor.
This question on the answer hub may have what you are looking for…
I downloaded the material and followed the steps. I increased SampleRangeX and SampleRangeY parameters to 3.0 to get a thicker outline. I also set edge threshold to 1.0 (lower values were causing faces to highlight when viewed at glancing angles).
I’m not sure what changes you would do to this to provide things like different colors for different characters though.