Horses can get cast on any vertical fence or board or whatever.
My horse got cast in his stall, shavings were banked, 12x12, he was 1-2 months old (I didn't own him, but bought him at 3 months old). He also got cast into my mesh fencing, ripped the front of his hind cannon, at 7 months old - I saw green fence markings from the tee posts on his hooves but didn't see him cast but he was I know it. THEN he cast himself again into the mesh fencing and waited until somebody saw him, 2 yrs old he waited calmly and patiently btw, legs stuck through the fence. Same spots in the mesh fencing btw, near the driveway in front of the house. Dingbat. The last time was the last time, he is 15 yrs old now. Guess he finally learned after 3 times - that I know of. This horse lives in a 13A pasture. But yet he had to get next to the fence. Go figure.
I have 12 x 12 stalls, no shavings, rubber mats, and a run. No castings ever. When they lay down, yes on the mats, they lay in the middle of the floor. I think maybe shavings are the issue. I do not do shavings, because I hate to clean stalls, done plenty back in the day. Just sweep them off to clean them. Less flies too.
As a matter of fact not 3 days ago saw a 6 month (not sure on age but weanling) $$$ QH colt cast in a fancy well made 4 board wooden fencing. I stopped and alerted the owners, and he got out of the situation. His baby sitters (couple geldings) were there keeping an eye on him.
West of insanity, east of apathy, deep in the heart of Texas.
There are some horses that get cast out in a flat paddock fifty feet from the nearest fence line. There are some that won't get cast lying down in a straight-tie stall. Stall size, banked shavings, none of it seems to matter to one with a talent for getting cast. Sorta like nothing being foolproof to a sufficiently talented fool. Build your stalls the size you like, and be done with it.