They are related phenomena. Basically, sand and mud have pore space in between the grains that is filled with fluids (water, oil or gas). When those fluids are extracted, the rock contracts because the pore pressure decreases, causing an increase in density (compaction) and a decrease in volume, which leads to subsidence. Some of this is recoverable, and some of it isn't, because the grains will find a more efficient packing arrangement.
You are completely correct in that there are many different factors involved that are all causing problems; unfortunately they are all interrelated.