Yes you could but….
Unless you have several, seperate heaps you may find that you are jepordising the plants by the (hopefully) frequent visits to build and turn the heaps.Also, in my plot, the only place slugs are tolerated is within the composting area, as they are a composting mechanism. They will enjoy squash. If you have a composting heap of FYM, then if you are not using it this season, it may be a suitable site for them. I would deposit a large bucketfull of compost for each plant and plant within that. You will find the squash roots will penetrate well into the heap.