With regard to compensation, the first thing most dog owners that find themselves in this situation do, is offer to pay for the farmers loss if the dog has been caught. That doesn’t fix it though. Its about way more than money and it is an upsetting experience. There is a difference between the planned death of slaughter and the needless death of sheep worrying. Most farmers care very much about their animals welfare and take pride in their husbandry. They put in hours that often from a financial view make little sense if costed out rationally, and existence can be marginal. Without this care, effort and love for what they do beyond financial considerations, most small farms wouldn’t exist. They are also upset by the loss of the dog in my experience; again, it is a needless death that is not the dogs fault, and dealing with grief stricken owners is a difficult thing that causes pain to all involved.
How death occurs on a farm is a strange thing. Whilst in their care most farmers care deeply about their animals. Once the decision has been made to send for slaughter a different moral code operates with the animals becoming food and a product. Beyond humane slaughter the husbandry and care then focuses on new or descended stock. That is just how it works, and all who enjoy meat are complicit in that moral distinction. Its just part of the weirdness of farming livestock, and meat consumption.
To suggest that the death of animals through sheep worrying is of no consequence in anything other than a financial sense is not accurate. Farmers care much more than that.