Sin is distorted pleasure, so we need pain analogous with the severity of sin in order to re-establish an equilibrium, according to spiritual law.
Penance isn’t given as revenge—but as medicine—in order to keep the sinner (through pain) away from the sin which is (as I said) worldly pleasure. Penance isn’t given to have the sin forgiven—this is done in the moment the priest says the prayer of absolution. Penance is given in order to help the sinner to not fall anymore.
This isn’t dangerous. On the contrary, it is healing because the sinner, if he respects the penance, will be set free from the slavery of the sin.
That’s why penance takes into account the quantity of intensity and time of the pleasure felt by each one of us. On the other hand, it is tough. In historical time, periods of penance evolved in analogy with the spiritual state of our civilization seen as a whole. That’s why, in the past, there were penances which lasted tens of years because, in that time, the sinner became much more spiritual and the penance had a healing effect.
Nowadays, because we are much weaker, penances last much less because, usually, we fall into indifference and sin even worse when we get such a lengthy penance. On the same topic: in the past, there were penances with hundreds, if not thousands, of prostrations each day, and/or very strict fasting. Nowadays, again, because of our much weaker nature and our much less time in which we have to dedicate to God, we cannot fulfill these anymore.
We do not say that the lack of time for God is a good thing—because of many reasons, including the fact that some can jump to the other extreme of minimizing (if not abolishing) penances, a phenomenon which leads, in fact, to insensibility.
Penances aren’t risky—because God is not a blind force which allows death to appear randomly. On the contrary, God is a loving father who never left us orphans so we shouldn’t be afraid abouth death if we are repenting.
We need to mention here that while, above, we dealt with spiritual penances applied by priests, the same way of thinking can be applied in other cases in which God put leaders in various domains (for example, familial, social, and professional). A father or a manager should apply some corrective measures adapted to his situation, taking in account the above mindset.