The best way to teach a horse to support himself and not lean on you when you’re picking out his hooves is to not slowly place his foot on the ground when you’re done with it. Instead, when you release the foot, just let it drop out of your hand. That stops the horse from getting in the habit of wanting to lean on you when you pick up his foot. He needs to be responsible for himself. If you pick up the horse’s foot and he leans on you with his body, just drop out from underneath him and let him hit the ground. It won’t take him long to realize that if he leans on you, you’ll jump out from underneath him and he will lose his balance.
It’s the same concept as leaning on a weak post. If you lean on a post and it breaks at the bottom and you fall over, you’re not going to be very keen to lean on the next post because you’re not sure if it can support your weight. But if that post just stays put, there is no reason for you to stop leaning on it.