Move somewhere with more turn out? What else (besides other stereo typical behaviours) is there for the horse to _do_ in a stable? It is simply not a natural environment for them. You could try making sure there is always forage available to mimic grazing as a first step?
Mine used to run his front teeth across the metal bars between stables like a convict in a movie runs his mug across them. It started as a stress reaction to being in internal stables with horses over-looking him. Overall he was unsettled there. It then carried on when I moved but instead he would mostly do it on the inside of his stable door or along his wooden walls. Prior to being on that yard he didn't do it.
I changed a few things in his management but he still did it to some extent all of a sudden he stopped and it seemed to be when I added brewers yeast to his feed and made sure all his feed was unmolassed. I did also put cribox on key areas. He also chewed a lot of wood in his field again this seems to have stopped. Not sure if it was coincidence or whether it just settled his tummy.
He doesn't do it when he's stabled - just when he's tied up outside whilst i'm mucking out etc or tacking up etc. sometimes he won't do it for weeks and then one day like this week he did it constantly whilst i was mucking out! I added Brewers Yeast but didn't seem to stop him.
I'd tie with haynet (if allowed on yard) or pop out/in school/whatever facilities are available where you are.
You'd probably get bored tied too.
Edited to add: or just ignore it. If you tie for minimum time to muck out it won't be very long out of your day. I used to know one who would pick up a plastic curry comb to scratch along things for the noise when bored - I thought it was quite fun TBH!