As you are aware hay can be very heavy, and if the end of the stack falls over it could damage the wall. If you have a way to ensure that it would not place excess weight against the walls it would keep the hay protected very well.