It looks like a current shunt resistor. It is used to calculate the current flowing through the circuit by measuring the voltage drop across the shunt resistor. Shunt resistors have very less resistance but are rated for higher power rating. They have resistance anywhere between 10 to a few 100 micro ohm.
Many of the “hobbyist” soil probe circuit designs actually pass DC current through the probe, which inevitably results in electrolytic corrosion regardless of the metals used. If you only briefly power such a horrible simple circuit and with a low duty cycle you will get less corrosion per unit time. There also should be no flow to ground when off.
Gold can help reduce corrosion, so plating the parts in contact with the soil will help. You don't need to plate the parts that stay out of the dirt, but it won't cause problems if you do.
Gold conducts nearly as well as copper, so the plating in no way interferes with the function of the sensor.
Gold itself doesn't really corrode. That's really the best ...
Obfuscate the code and let them have it. See Stunnix for example.
(I have no idea how good this is and have never had to do such a terrible thing!)
To be somewhat fair to your employers you should document what the libraries do, what the inputs and outputs are, etc.
PCB is an inadequate technology for 50 kV as your creepage distances will be like half a meter. Air is a much better insulator than any PCB surface, so you'll have to lay your circuit on a bunch of insulator pylons connected by high-voltage cables. Then you put that in an enclosed cabinet / building with a lock, and make a system tracking who is currently in ...
The linked document in the comments below the question is about gas-discharge surge arresters and the picture you embedded in your question cut-off vital detail: -
What Should be the Breakdown voltage of GDT ?
For a 230 V AC line you can use either a 470 volt or 600 volt GDT as listed at the top of the drawing above.
simulate this circuit – Schematic created using CircuitLab
Figure 1. AC monitoring and shut-off.
Monitor the AC instead. RLY1 will drop out when the AC is switched off. It's contact will open and disconnect the DC output.
simulate this circuit
Figure 2. PSU discharge circuit with no extra power loss during normal operation.