> I gather all farmland in Scotland is open access, and livestock have to be put somewhere!
Absolutely, I can't find it now but I did read an article about human cattle related injuries and we have less up here then in England, despite having the right to roam, of course we also have less people so it probably doesn't tell us anything

The outdoor access code has guidance for both farmers and dog walkers and generally works pretty well to keep people safe.
It tells farmers
"Keep animals known to be dangerous away from fields crossed by a core path or other well-used route. If this is not possible, tell the public and signpost a reasonable alternative route"
Dog walkers are told......
Never let your dog worry or attack farm animals
Don't take your dog into fields where there are lambs, calves or other young farm animals
If you go into a field of farm animals, keep your dog(s) on a short lead or close at heel and keep as far as possible from the animals
If cattle react aggressively and move towards you, keep calm, let the dog go and take the shortest, safest route out of the field