There was a topic about a similar attack, as it seems to have hit many Discourse instances, but I can’t find it; it seems it has been deleted?
I was advised using ai as well.
I didn’t use it at this time so I did two things:
I prevented new attacks on my instances by installing Stop Forum Spam Plugin ( unofficial)
I also ran a rails script to delete accounts (and their posts) created in the last X hours to recover the forum in a proper state.
In the future, I’ll have a more serious look at ai since it’s the recommended (and official) solution to prevent this.