I know people have opinions about Cloudflare but why not use it here, at least as a stop gap? Stopping bot traffic is one thing it does very well.
I eventually just shut down my mediawiki instance. I couldn't find a way to keep it online and still run on an affordable VPS.