Not sure if there's an exact list anywhere but generally special buildings that produce fps (shrine of knowledge, lord's manor, sundial spire etc) are prioritized. After that it goes to other special buildings like tribal square, oasis, and the other various buildings that need to be motivated to produce stuff.
Then I believe it goes by order from highest age to lowest - and I've also noticed that within the same age for residental/supply buildings, it goes by which was built the most recently.
So there is a specific order in which it goes.
As for manipulating it to your advantage, I'm not sure how? I know one important piece of advice is to not build decorations, as they are small buildings giving out happiness on a small scale. They tend to siphon valuable m/p's from other buildings and are not worth it.