Pigs need mud psychologically and physiologically. My natural pig farming system provides a mud 'bath' in one corner or side of the pen. Kept wet with water this provides a splendid cooling wet water bath. Left dry, the natural coolness of the soil provides the cool that a pig seeks. A pig doesn’t want to lie in wet mud all day and night, so our natural pig farming practice is to add water during at certain times of the day when the weather is hottest, and then let it dry naturally. We apply the water with a watering can (we're very low tech) which enables the pigs to get a cool shower as we pour.
The larger the mud bath area the better as pigs will spend most of the time in the mud bath. In hindsight I would increase the size of the ones we built in our pens so bear this in mind when you see the mud bath visuals scattered around this site. To make a good self contained mud wallow you do need to dig down about 50 cm and build a block brick enclosure 2 block bricks in depth. You can then re-add the soil you have dug out. This soil needs to be topped up on a regular basis to keep fresh. Adding red soil is a good idea as this will help keep the pigs healthy and also add the IMO fermented solution in 10 liters of water regularly to ensure plenty of healthy indigenous micro-organism activity to keep the mud in healthy condition.