Corrosion-free soil moisture sensor

About 8 years ago, I used a Grove-moisture sensor to measure soil moisture. I left my office, keeping the sensor immersed in soil. The very next day, when I came back to the office, I found the sensor was already being corroded. I understood that the sensor was not for real-life use but for project demonstration only. Do you have any version now that can be immersed for years in soil without corrosion?

I just “conformally coated” them, and “potted” the electronics.
Solar powered, 30F UltraCap.
Very low cost solution.

What did you use for coating? Would you please share a little bit more?

Something similar to this… I don’t have the exact name as I finished my last batch. The one I used was black. This looks clear.

Then a 3D Printed enclosure filled with Silicon Sealant.

Edit> This looks like the coating I used.