Ok a ten year old doesn’t really understand how really wrong this is. I am not excusing this at all in saying that. Instead I am considering the lack of maturity and how children explore and often even being encouraged by a friend or cousin.
The timing was strange yet this may be something that is genuinely bothering him and he must need to finally say what he did was wrong.
When he did apologize to you he was giving you the power. That is important to understand. You don’t have to reply with forgiveness. Yet you could say you appreciate his acknowledging what he did was wrong.