When I was working on large-game optimization (see https://intfiction.org/t/improving-performance-for-large-games/6677/1 ) I found that I7’s default model of “set grouping flags every time you list contents” didn’t scale well. I was able to switch that over to “set grouping flags when play begins, leave them alone thereafter.” Big improvement.
Of course (a) that requires some deep I6 hacking, and (b) the kind of game you’re talking about needs to change the grouping flags sometimes, and © I haven’t ported my sample code to 6L02. But it will eventually be worth going down this path if you intend to make this game.