We started DD being allowed to leave school at the same time as me, but walking home while I drove, (7 minutes walk, no roads to cross except 2 cul de sacs in the estate), to letting her leave to get home within 10 minutes of me, to going home after her activities in school at 4pm. This started when she was 10 (Y5 equivalent) and by 11, she needed to (for bullying in the afterschool club) go home herself twice a week at 4. In Y6, she was going home every day between 3pm and 4pm (depending on the afterschool activity).
We taught her to use the keys.
We had rules about no one else in.
She HAD to do her homework.
She had a phone and needed to check in with us.
And we also made sure she could get a snack - she was already doing pot noodles using a flask of hot water at summer camps, so made sure she could boil a kettle safely, she was already using the oven for baking so improved that so she could do it safely alone, and made sure there were cold things or easy to make things there. (She didn't use the gas rings alone until nearly the end of Y6, but was very happy to use the electric oven from early Y5).
We ran through what to do if things went wrong, who to go to, and when it was a good time to go to them. There were lists of emergency contacts on the wall - neighbours, extended family, the GP and other useful people etc. And we talked to the neighbours as well, so they knew she would be around.
Can you take some time to ease him into it? Work from home for afternoons for a week or so? Get home early and do another hour later for a couple of more weeks after that? As it is a long time at that age to suddenly be alone and responsible.
You probably also need to tell school in writing that your DS has permission to walk home alone (not necessarily that he will be alone - don't lie but don't add unnecessary details). And if school asks, again, don't lie, but say that he will be alone but you have all talked about it and he knows what to do, you've put in place the necessary measures to protect him, and as parents, you are taking that responsibility.