Hmmm. Our page about deer flies
, aside from describing the life cycle doesn't offer any remedies (and if you were stationary in a yard I personally have found that the fly trap described is also not effective.) I don't find a section on insect repellant, though the topic comes up regularly on the radio program and lots of suggestions and tips have been offered over the years.
You may have to search the forum, I'm sure it has been discussed - the fewer key words the better. A couple of household items that come to mind are vanilla and garlic (not at the same time), in water and sprayed on. You may need to make a number of short hikes with different search results to test the effectiveness of each.
I was told many years ago that brewers yeast contains a lot of vitamin B and that is good for repelling insects for people - I think it had to do with a subtle scent change in human sweat with vitamin B. Dogs don't sweat of course, but if it somehow changes the scent that might help. I buy brewers yeast in bulk at Central Market (Fort Worth) and spritz a little (1 tsp) on their dog food in the evening. They like the taste.
There are lots of readers of these forums and lots of opinions, so hopefully someone will come along with one that can try out that will work for you.