He says regarding the matter of purifying the soul, that a person should punish himself when he commits a sin or falls short in obedience to Allah, like when he misses the night prayer.
Or if he is late for prayer, then we give charity.
And we encourage it to pray extra units, and so on. I remember reading something like this from some of the early generations. Is this method wrong or correct?
Yes, some of the early generations, may Allah have mercy on them, used to punish themselves if they fell short in something, as happened with Umar.
May Allah be pleased with him, when one day he missed the prayer because he was busy with his garden, so he gave it all away in charity for the sake of Allah the Blessed and Exalted, so it would not distract him again.
The Lord, as Sulayman did, peace be upon him, said: I loved the love of good over the remembrance of my Lord.
I was overtaken by love for good things, my Lord, until it disappeared behind the veil. Bring them back to me, so he began wiping their legs.
And he slaughtered all the horses and offered them as food to the people. He said: Eat them, these distracted me from remembering my Lord.
Then after that, Allah replaced them for him and gave him the wind, as the Prophet ﷺ said: Whoever leaves something for Allah, Allah will give him something better.
There is nothing wrong if a person, for example, falls short in something and then gives charity, or goes and prays two units of prayer. This is following up a bad deed with a good one.
They allowed it, but it should not be done as an obligation, rather it is a form of compensation.
So whoever does an atom's weight of good will see it, and whoever does an atom's weight of evil will see it. And the heart, as the Prophet ﷺ said.
The trials are presented to the hearts like a woven mat, reed by reed. Any heart that absorbs them will have a black spot marked in it, and any heart that rejects them will have a white spot marked in it. The good deed a person does is a white spot.
And the bad deed a person does is a black spot. So if a black spot is marked in his heart, he should mark a white spot.
A white spot, in order to balance things and keep them in check in his heart. Allah is the One whose help is sought.