If the food box is empty and the city loses population the civil engineers have no effect because the governor will rearrange the citizens to working tiles before production in the city is calculated.
Science and income are calculated before the city cycle is started which alows Scientists and Taxmen to have effect even if the city will starve.
This also gives room to play that can be seen as exploitative, but whch requires a lot of micromanagment. It is possibly already known by many players.
It works as follows: if a build is completed in a city, you can use the zoom to city pop-up window to enter the city menu. By pressing the arrow buttons on top, you can cycle through your cities and manually rearrange the working tiles of all the citizens in your empire. So for example if Salamanca, the capital of your iroquois empire builds a unit, you can now cycle through all your cities and rearrange the citizens of the other cities, p.e. Niagara Falls from tiles high in commerce (sea and rivers) to tiles high in food or shields (forests or hills).
Not only gives this a boost to your income but it can also boost production, because in the turn of a completed build, the same food/shield rich tile can be used by two cities . For example if Salamanca and Niagara Falls share a tile that has an irrigated grassland + cow and Salamanca completes a settler, you can remove the citizen working the cow in Salamnca and assign a citizen from Niagara Falls to the tile - using the trick above. Now on this turn both Salamanca and Niagare Falls will have benefited from the extra food.
A next step would be to time the completion of projects in cities that come early in the city cycle (e.g your capital and capitals captured from the AI) so that you can use this commerce and shield boost almost every turn. As this requires a lot of micromanagment, i only use it in games at Sid difficulty. I don't know if it is banned in competitive play btw.