It doesn't matter which side you pick, both ways will have a serious negative effect on the Thalmor.
If the Stormcloaks win, the Thalmor and the Legion are forced out of Skyrim. If the Imperials win, then there will be a united Skyrim without conflict, which results in a possible rebellion agaisnt Thalmor, nords and imperials alike.
If you want to have a treaty, you'll have to finish more of the main storyline. The treaty is only temporary and will help whichever side you want the treaty to be in favour of. Please note that if you join the Imperials or the Stormcloaks, you cannot do the treaty mission. Only after the treaty mission do I choose a side, because I make the treaty work in my side's favour so the war is easier for me.
Normally I join the Imperials, because I am usually an Imperial, Orc or other Mer.
If I am a Nord or Breton, I pick the Stormcloaks.
If you really want to get into the story, you can help out Maven black Briar by joining the Imperials. If you complete the war, she will be on the throne of Riften. If you don't want Maven on the throne, join the stormcloaks.
Join the Legion, and help us repel the filthy rebels! For a United Skyrim!