Yes, it quickly gets complicated.
I'll throw one more complication in too.
A dehumidifier has two "sides", a hot side and a cold side. The cold side condenses water vapor in the air into liquid water to push humidity levels down. Yay!
But the net effect is to raise the air temperature, not lower it. Stated differently, there is more heat coming out than cold. It may very well still make a lot of sense to use one, but you won't get any cooling from a dehumidifier.
Geoff Lawton's latest free video shows a nice presentation of earth coupled heating/cooling in a greenhouse. Here's the thread about that;
https://permies.com/t/43078/geoff-lawton/Heating-glasshouse-geo-solar-live
finest regards,
troy