"It wasn't really peaceful or prosperous."
With the exception of Bosnia, A-H territories haven't seen any fighting or civil war between 1866 and 1914. People utterly forgot what war even meant.
As for prosperity, there were huge differences between individual regions and Cisleithania (Austrian lands) was quite a lot more industrial than Hungarian lands, but the living standards were improving fast, as was literacy, healthcare, public infrastructure etc.
It is not entirely clear what would have happened without war. Nationalisms were strong, but so were innumerable ties holding the country together. For example, Spain is still a country, even though its regional nationalisms are very strong.
For nationalist movements to succeed, they need to convince a lot of individuals that they will be better out than in, which, for any of the smaller nations of the empire, was questionable. Even Hungarians would think twice about secession, given that their part of the monarchy was mostly rural and needed industrial output of the other part.
The Grossdeutschland movement, seeking to unite all German speaking peoples under Berlin, had more of a chance to succeed, because in their case, it would not mean independence but rather transfer of sovereignty to an already powerful nation (imperial Germany). A-H authorities generally considered pan-German nationalists to be the most structurally dangerous element.