I'm going to put a word in on this thread for dogs because there are too many posts encouraging death as a solution to the livestock dog problem. Even though it is true dogs are the greatest threat to livestock, they also offer one of the best, secure farm experiences. Dogs are a very advanced farm animal to have and need close monitoring and training. A farm or homestead is a different world altogether than a city dwelling with an entirely different set of realities. Different breeds come with various levels of challenges, but still all canines have prey drives. In fact, it is this prey drive that enables us to train them to do work. This is true even for LGDs. Dogs need strong leadership. If they don't have a pack leader and they are left to their own devices, they will act on instinct for the benefit of their pack in that moment.
The situation we have here with the original poster is a very difficult one. If a dog's reality is life without livestock and then is suddenly put in a situation where they have to cope with livestock. This is one of the more difficult situations to handle. It's easier if you bring a dog into a world where there is already livestock.
With dogs, the best tip I can give is to do what you can to avoid setting them up for failure. It's never the dog thats fails, it's the owner. Consider fencing, normalization time with leashes, and livestock time after walks or other types of exercise. It can take multiple years worth of this kind of effort before you can trust your dog unsupervised with livestock. I'll second what a previous poster said about normalizing homestead livestock with dogs by socializing them with young livestock. It's a sound strategy we've used with success. If they consider a livestock animal as part of the pack, you are most of the way there.
In my opinion, there's no better asset on a farm than a properly trained, working dog, but if you aren't willing to put in the effort that will prevent opportunities for them to fail, it's probably better to choose livestock or dogs; one over the other.