If I made a bot now, I would probably make it as a mod which overrides your orders with the bot orders.
Yeah I wanted to try this too at some point, but was afraid it will run into issues with speed.
All mods in a game combined are allowed X seconds of time at most before the game itself times out, so if the Lua runtime in C# doesnt run fast enough you put a lot of time into a mod that cannot be used.