Greetings to you JonC. Long time no write.

Been away on a project.
Musing on your topic, it seems to me that this word "punishment" can be put under the category of "creational experience", i.e., simply all the experience we face in God's creation. This creational experience can be said to have "trials" and also "blessings" in which all mankind faces and receives. We all, as human beings, face trials and are given blessings by God (rain, crops, food etc).
The Bible gives us good insight into how these trials and blessings are beneficial to those in Christ. It further describes these "trials" as chastisement or as you say "punishment" that is beneficial to the child of God and as you also write, this "discipline corrects those who are being made righteous." This "correction" is made possible by the trial, the Spirit and the working faith of those in Christ.
But what about the wicked? Do they not receive similar trials and blessings? When I witness to the lost, can I not connect with them in some trial that we have in common? Some blessing that each can relate to one another?
The point I am heading toward is that both the believing and the unbelieving have similar creational experiences (trials and blessings). To some, the believing, it is a stone that sharpens, to the unbelieving it is a stone of offense. To the believing it refines and shifts the intents of the heart, to the unbelieving it condemns and leaves one without excuse. In other words, it seems to me that many trials and blessings are universal in nature. How it affects our lives many times may be dependent on the Spirit within.
So trials, or punishment as you put it, is given to all and it teaches and reveals the heart. As these creational experiences are intended to cleans unrighteousness...eventually the unrighteous is cast out and mankind cleansed of their unrighteousness.
Keep seeking God's truth as if it were hidden treasure