The biggest part of the problem is calculating pathfinding and collisions between units. That's the main source of problems in all RTS games. And unfortunately, it has to be done in real time.
Still, precalculating AI decisions early on won't work. Game state changes so fast that plans become completely invalid beyond just a few seconds into the future. That early precomputation does zero to relieve late-game CPU strain, in fact, it does the exact opposite. Constant re-planning wastes processing cycles, massively complexifies the codebase, and drastically increases the risk of CPU throttling right when performance matters most.
This won't work for 0AD. The main issue late-game is CPU lag from live pathfinding and unit checks, not a lack of RAM. Precalculating AI plans early on wastes CPU cycles because as soon as a human player moves a single unit, the AI's precomputed plan is invalidated and has to be thrown out anyway. Disk swapping AI instructions would also cause massive frame stuttering.