Maybe it is a kind of communication, like I do to you that I do that to myself. This is just thoughts btw. In that case the path was not to replace the behaviour which is "only"a symptom. It was about finding a way to teach him to find other ways to communicate. No behaviour in company ever is simply doing stuff. There's always a communication aspect in it. That is true on every level of consciousness, if you ask me.
I have a mild variant of autism, these thoughts are written with respect and without the need to tell anyone what is right or so. My thought are: Try to get to his level. It's haptic and rude in a way. You can sit beside him, clap in his rhythm or slightly "punch" your leg. Maybe he can get jiggy with you and you can lead him somewhere else.
Again, this is just my thoughts. Please take it as such, I am not an expert in any way. Good luck and stay safe.