By the way it may be known, but is it possible that the placement of buildings and improvements by the AI is problematic? For exemple a solar plant in a corner next to.... nothing. I had to destroy almost everything to rebuild. In some other cases, the homeworld had many empty tiles, even in turn 100+.
I know it takes time and it is not easy to optimize! I just feel that I had to let you know!