Ok, as egypt you are religious so you can switch governments without much hassle.
After losing troops, cities, and having your troops in their lands/their troops in yours, people get upset in democracy. They get less upset in republic, and not upset in the other gov'ts. If the war weariness gets bad just switch to monarchy, or communism until the war is over.
If the war weariness is only moderate, then just turn the luxery slider up.
As for factories, they increase te base uncorrupted shields by 50%, and another 50% for powerplants (although nuclear is 100%), so factories and powerplants GREATLY imporve your empre. I would recommend getting them in all your main cities.