How to resort a topic's messages by date?

Oh. That’s too bad. Anything is possible, I suppose, but that will affect performance on the whole site forever..

You could conceivably delete those topics and the associated custom fields and then run the script again. You’d want to test very carefully on a staging site before you do it on your live data.