I believe the term for what you’re discussing is earth tubes. A search on that may yield some information, but basically the idea is to put a 4 inch or 6 inch tube buried underground. There is probably a calculation to determine how many feet you need based upon cubic feet of area to be cooled.
I have heard of these earth tubes being put above a leach field. That way you don’t have a separate excavation. I have also heard of them being put in with a Ditch Witch trencher about 2 feet deep. If you’re using 4 inch pipe that might work. 6 inch would be too big for most trenchers.
Basically you’re using the Earth for a heat exchanger. Down about 2 feet or more. The Earth temperature is a pretty regular 54°. BTW, there is a kind of flexible corrugated direct burial pipe that is best for this. It’s black and corrugated.
I am an ex building Contractor, but I have never done this myself. I have known people that have and it’s worked out well.