Like others, I think he was old enough to choose and this situation, mourning his 96yo Granny, is entirely different to W&H walking for all l that time behind their Mum who had a sudden and very unexpected death.
I think the formation and walking in time was quite normal for such an occasion and would have come naturally to W&Ah with their military backgrounds. The others just having to follow would have made it much easier than them having to think about a free flow jumble. Did anyone else spot Eugenie go to take. Step up too soon and the stop? It doesn't matter, but to me it showed how well coordinated they were and it would have frankly looked a disrespectful mess if they hadn't. It was a lovely touch having Louise and James in the middle.
Not that we'll ever know, but FWIW, if W&H thought it was a bad idea for James based on their past, I'd like to think they would have spoken up. Similarly, I've no doubt his parents would have absolutely forbidden it if they were worried, given he is still a minor. It would have been just as fine for the Queen's adult GC to do the vigil and I don't think any of the public would have thought twice.
As for Sophie, FWIW, I don't think she looked concerned in a way that suggests she didn't want him to be there. I would guess a mixture of sorrow and pride in her children. She is grieving herself, after all,