ISIS's handling of socioeconomic factors might be what dictates their future. As mentioned, they are struggling to maintain large cities like Mosul (electricity and foodstuff and such).
However, one of the intresting things about ISIS is their heavy emphasis on establishing a jurisprudence in the areas they rule (ie: Sharia law). This law is of course, both harsh and cruel - including torture and public executions and the like. However, at the same time, it's consistent and orderly in its implementation. ISIS
actually cares about these laws being implemented "correctly" and does try to battle corruption and educate its jurists.
For a population that is used to corruption, where the law is subjegated to the whims and wishes of the judges. Such a system could be seen as a great boon for ISIS. Yeah it's harsh. But at least it's consistent and clear, unlike the previous secular rulers. People like that sort of stability and order, especially war-exhausted populations. And the native population is used to brutal stuff like torture anyways - so that won't faze them to much.
ISIS ability to placiate its population based on govermental questions such as these might dictate their future. Otherwise they might be conquered by the Shiites, or replaced with Sunni tribsemen or other Jihadists.
For an extensive article on this:
http://www.joshualandis.com/blog/legal-foundations-islamic-state-mara-revkin/