The order of the gems seems to be chosen at building time, independent from the window position or selection order and probably only dependent on the gems itself [not the gem type, but really the single chosen gem] - taking the exact same gems [I expanded the list with x] always gave the same cycle, but choosing different gems of the same types does not always do this.
One possible interpretation: All items have some number (the index in some big array of all items probably) and they are chosen by that. Newest items normally get the highest index (and probably always the smallest unused index). Maybe this is the order in which the game adds them (on either ascending or descending order). Checking this is hard, but not impossible (new gems from mining or caravans should get highest indices), and building according to this order is hard, but not impossible, too. I recommend buying (mining) gems for three years, storing them at different places (one for each year), and then choosing the gems such that one is from each year; to fill "holes" created in the list, mass production (more every year!) is usefull, and probably buying some more cheap items with the gems helps, too (as will only selling a very small number of goods, ideally only one steel/cotton candy serrated disc).
Forbidding parts doesn't work, they do not only suspend it, but cancel it (this holds for all buildings I think, but I specifically checked this for gem windows). Same for locking some parts away: the order seems to be chosen at building time, and they will only add them in that order, or suspend it as long as this is not possible.