I also beat it by abusing a sort of bug. If you build walls to block all the entrances, the enemy armies will get stuck outside the walls, leaving only infantries to pass through, or kobras and minos to occasionally fire at your base. So my base is peaceful enough and I tech up. Then I built adv carryalls and simply lifted anything that can be lifted form my base straight to the worm. By then the AI armies will start breaking the walls but you're already killing the emperor worm so, what are they going to do.