Both of our kittehs are long-haired and we feed them Blue Indoor Health dry catfood. It is a “hairball” formula and they are thriving on it. The male, a Birman, very rarely has a hairball. The female, a Ragdoll, has them more frequently than the other but not nearly as often as before we started them on the Blue. Before that, they ate Royal Canin but they are both doing better on the Blue and they like it, too. Hairballs on kittehs is just the way of life for most cats but having to get surgery to remove them IS excessive. Does your cat drink much water? If not, get a fountain type watering contraption where the water is flowing and recycling. They prefer water like this and it encourages them to drink more which will relieve the constipation. Also, a good quality canned catfood has extra water in it that helps.
This is just an idea, but to keep the cat from grooming the dog, you might want to use a dog shampoo that is citrus based. Cats don’t like the smell of citrus. Hope he gets better!
He seems to drink a lot of water. I’ve been considering one of those fountain bowls.