I had this problem and I was told to staple some sort of thick thorny bush to the inside of its stable door and leave with no rug however I didn't want my horse skewered! I also got told to fit a complete grill over the space above the door but I thought that was a bit harsh and that it wouldn't look nice. In the end I had my dad build me a bar that was set back into the stable a bit, at chest hight to the horse so it could look out but had to try harder to kick the door I also upped the things that she had to do in her stable so she wasn't getting bored.
If the problem is only while you are on the yard then fit a solid chest hight bar and put that up and leave the door open, if they cant do it then eventually you will break the habit. Sorry I cant be more useful.
My friends cob used to do this, she went to a DIY place and bought some cheap door mats and stuck them to the inside of the door, as it caused no noise he stopped doing it.
Staple a big square of old carpet to a strip of wood and fix the strip of wood to the inside of the stable door, so that the carpet is hanging an inch or two away from the wood of the door. Ned kicks at door, kicks flappy carpet instead and all the energy is absorbed so ned gains no benefit and should stop. Even if he doesn't stop (ingrained habit), he will be less likely to damage his legs/feet. Another solution is to fit a sturdy webbing door guard so the door is left open and ned has nothing to kick. This often doesn't work because a determined door kicker can start kicking the wall next to the door instead! Good luck!
I was told not to react, as horses sometimes kick the door to get attention. It's hard to ignore him at that moment, but absolutely no reaction means the kickingnoise is useless to the horse.
Ignore the horse as he is doing it to get a reaction, keep changing the routine slightly as most stereotypic behaviour increases at specific times of the day feed time or when anyone walks down the yard and put something on inside of door, carper, rubber mat or an old tyre.