"Though you pound a fool in a mortar with a pestle along with crushed grain, yet his foolishness will not depart from him"
The difference between someone who is a fool and a person who does foolish things is hidden in this verse. The confirmed fool you cannot separate from their selfish, impulsive, rebellious behavior. No matter what you do to them, they are welded to it and it has become them. At that point you are working with a fool and all the confirmed consequences apply. Solomon is trying to instruct us so that no one we know would ever become a confirmed fool. But if it happens that you run into someone like this, then basically it is almost hopeless.
Notice that the harshest punishment and the harshest forms of training and development do not cause him to give up his selfishness. He clings to it, and more importantly, it clings to him. This is tragic. It will be a life of problems – like riding on a picket fence.
This is why it is important for parents to train this selfishness out of their children when they are young. All children are born with this bent toward selfishness. They must be trained in all kinds of ways to consider others and God's glory ahead of their own wants and desires.