Speaking from my anecdotal experience this type of punishment doesn't work.
The lesson he will learn is to be ashamed and he'll bear that shame for a long time, perhaps decades. He will stop trusting, especially authority, because he's learning that authority isn't always right. His school sucked and even his parents either suck or he will believe and internalize that they suck. Not trusting authority makes it difficult because much learning will take place from experience and his own misguided attempts to figure stuff out.
He'll read in the papers or hear on the radio how only losers and addicts and horrible people are poor. He'll look at his parents and feel shame that they are losers or addicts or horrible people (even if they aren't).
He'll stop asking for things and stop trying to get his needs met and may even have difficulty recognizing that he has needs. If your parents can't feed, cloth, or get you to school you just shut down that needy part. Well, you try to anyway. Needy is big though and will come out later in other ways.
He'll probably act out as he gets older. Hopefully it will be with mild alcohol and drug use and eventually harmless sexual escapades and not with the criminal justice system.
How should this be handled? The kid should not even know there's an issue. Kindness all around because he is completely not at fault ever for being late at this age. It doesn't even matter if he dawdles or doesn't mind at home. It's the adults job to make sure he gets ready in time.
The school or someone should reach out to his struggling parents and give them some non-judgmental support. Financial, therapeutic, simple logistical, or whatever is needed.
Or maybe none of these bad things will happen. He'll be resilient, get over it. His parents have had a minor setback and will be fine. The school will learn a valuable lesson. The parents will get a support system if needed. Maybe.