I did use a hex editor to look at the temporary file and it means nothing to me. Perhaps TheBlood may know how to decode it. If you can decode it then you would need a program that could do the following in its simplest form creating a CC3 equivalent of an operation:
1. Maintain a database of teams available to the player and AI. This would need to read the red and blue teams files and allow the allocation to be made from there and saved as a 'operation force pool'.
2. Either randomly allocate a linear grid of maps, or allow the user to define the grid.
3. Copy the temp file prior to its deletion and save it to another folder
4. Extract the information from the file that is needed.
5. Reduce the teams available by those lost, and use a decision rule on what to do with teams that have been heavily depleted.
6. Use a decision rule on weather the map was won, lost, or to be replayed, and allocate the appropriate map for the next battle based on this.
7. Request the player to allocate the teams for the next battle based on availability. AI would have to be done on some sort of predetermined force composition based on availability and type (armour, infantry, recce, command etc based on the team file).
8. Write a scenario file.
With my limited knowledge I think only steps 4 and 8 are the hard parts, the plus side is that it does not require the engine to be modified. It of course could be made much more complex and this does not take into account multiplayer. Apart from Mafi and TheBlood I don't know of anyone in the community who could attempt this.