The punishment must be proportionate to the offence.
__________
In no case. Punishment is perceived as a price, not a punishment. And even with the inevitability of the problem, it becomes more profitable to commit an offence than to abstain. And this applies not only to the upbringing of children, but also to punishments for adult crimes, especially administrative. Look at the same car owners - the one who rides on red and then pays fines, perceives the ride on red not as an offence (which can lead to tragic consequences), but as a luxury for which he pays (the type can afford it).
The punishment should not be proportionate, but demotivating.