Is Public Penance necessary?

Nowadays we are used to our confessions being wholly private matters which is between only ourselves and our priests. Any penance we do we usually keep to ourselves. In a rare cases, do we directly tell others about the sins we needed to have cleansed from our souls.
However, during the past days it was sometimes the case that very public confessions and penances would be expected especially when it came to transgressions from well known individuals who had either committed great wrongs or who had rebuked the doctrine of the Church.
Do we need to practice public penance today?
Firstly, the sacrament of Penance and Reconciliation is the means by which we are absolved of our sins and repair our relationship with the Lord. However, it is also a way by which we might publicly acknowledge our own sins and to become examples to others of the need to ask for forgiveness.
When the penitent brings themselves before both our fellow man as well as God, their willingness to be exposed becomes testament to their penance in a way that silence never could be.
Public penance is a practice which should not be left only in the past, but also in an age of social media and interconnectivity.
As public penance can be made through our leaders, so we should be encouraged to always approach our leaders both civic and spiritual.