You could also try and get him thinking that good things happen in his stall. Treats/grain/hay/grooming/etc to help him get over his anxiety in stalls. All he knows is that there is no place of peace inside the confinement of a stall. He does not know otherwise of how he could feel so he needs your help. Kicking chains, sorry to say, will have a reverse effect on his behavior because whenever he kicks he will have pain, no matter how slight. He will connect his stall with pain and anxiety, so he will continue to dislike its environment. It will take some time but I think we owe it to our horses, much like our children, to help them get over their fears & dislikes.
In riding, a horse's energy is like a river- guided by the banks but not stopped by them.