The best way to replicate this is talking to the lottery girl as soon as you load your save file, as this is when Rotom ALWAYS talks.
Edit: Couldn't replicate, I managed to get the Battle Tree "person" to save the game while Rotom was still speaking, no crash.
Maybe its only the lottery?
Did you have the text speed on fast and make sure it was longer text? In the 2 instances it happened to me, Rotom still had text being printed and (I think) on the 2nd go, Rotom's text was done printing right as the game began to save (but his mouth was still moving).
You can do it without saving in the lottery building, as in my 2nd go, I was saved at the Daycare and traveled to Hau'oli while looping the text by opening the menu every so often and got it to freeze once it saved.
Kinda wondering if I should attempt to get it on video, maybe I'll have better luck again.