One can’t separate these topics from the concept of “the political” as it created in the 18C: i.e., viewing power as distributed across a “public” (i.e., a product of the rise of democratic theory and participation), the disparate rates of democratic emergence which placed conflicts between countries athwart this differential, and the coalescing of this “political” sensibility in ethno-national groupings (i.e., the nation-state). In terms of assessing the ideological component of wars, we have to be clear about the term “ideology,” by which I mean the set of ideas around the proper organization of society and human purpose. There is a lot of overlap with the idea of epistemology here; i.e., how a group of people understand the world should be consistent with and, in fact, determine how they organize the society over which they have power. In other words, there’s a good argument that there wasn’t anything quite like “ideology” before the modern era. While there were “beliefs,” especially religious ones, the resulting worldviews were different than how we think now. At least nominally, they were about the relative power of which ever God was being fought for.
The historical development noted above thus suggests two implications; one backward looking and the other more contemporary in manifestation. First, prior to the Reformation (16-18C), at least in Europe, there is little sense that wars were fought for anything other than power. Going back, even to the earliest civilizations in the Middle East, while wars may have been nominally characterized as “our God vs. your God,” I suspect there were few substantive differences in outlook; i.e., religious differentiation was a rationalization for a power struggle actually animated by ego (“glory”) or economics (spoils, conquest, or tribute). The Crusades might be an exception here.
The wars (both “civil” and “international”) that crashed across Europe for a few hundred years in the 16-18C fused this “God vs. God” trope with contemporary power politics. Theological articulation on both sides, however, provided a broader intellectual rationale to these differences. Accusations of heresy and apostasy on both sides amplified the animosity, but, more importantly reflected the differences in world view/ethics deployed by both Protestants and Catholics. In other words, the “ideologies” of that age were aligned by religious beliefs rather than how/whether to disrupt the (effectively) universal monarchical power structures of each participant.
Along those religious lines, the results were inconclusive: both Protestant and Catholic regimes remained. It didn’t take long for the former dividing point became, in many circumstances, secondary to power politics (e.g., Protestant England and Holland allied with Catholic Austria against Catholic France in the late 17C, Catholic France supporting Protestant (incipient) USA against Protestant Britain during the American Revolution).
Second, the American and French Revolutions of the late 18C marked a shift in the nature of ideology from the religious to the political. While neither produced an immediate and sustainable democracy, the idea that the “people” should be in charge rather than a monarchy (the “Ancien Regime”) was a central motivation in each case. In the US, actual steps towards democracy were limited and elites remained firmly in control for (at least) decades (a century-and-a-half?). In France, revolutionary instability meant that democratic ideas were bounced around like ping-pong balls for a decade until Napoleon asserted a new monarchy/empire which only lasted until the Ancien Regime Bourbons resumed the throne in 1815.
In terms of wars, there is little to say on the American front in the first half of the 19C. The foolish fight of 1812 had no deep motivation and the Mexican War of the 1840s was a land-grab. France, on the other hand, actively sought to export its Revolution across Europe for a decade. Even after Napoleon donned his Emperor’s mantle, the disruptive nature of his wars meant at least a shift from the deeply-embedded power structures. So, we have—certainly for 1791-98 and somewhat thereafter—ideological wars in Europe.
The post-Napoleonic restoration of monarchical authority pretty much put paid to such activities for the rest of the 19C in Europe. Imperial wars were about power, as were the occasional outbursts of international war which punctuated the period on the Continent.
Curiously, one could make a plausible argument that the US Civil War was ideological. To be sure, there are plenty of economic/power rationales for the North to continue and the South to oppose preservation of the Union and fighting for or against that preservation itself doesn’t say much about ideology in the absence of underlying motivation. However, to the extent the War can be characterized as being “about” slavery, it would then be about “the political” i.e., the proper nature and structure of society. Still, this interpretation of the War’s genesis and rationale remains hotly contested among historians, so I’m reticent to put it definitively in the “ideological” camp.
Taking another angle, but sticking with the pre-WWI era, one could look at the various revolutionary efforts and conflicts about independence (e.g., various nationalist/liberal uprisings in Europe across the 19C, India in 1857, early 20C in Mexico, China, and Persia). None were successful, none had much international oomph, and few lasted long. From my (admittedly limited) reading, they were more about which oligarchy (local vs.. foreign) was going to run the show (echoing the American Revolution) even if some were clothed in more democratic slogans. Perhaps the best case can be made for the Russian Revolution of 1905. While it, too, was unsuccessful, domestic and short-lived, it did have a stronger democratic flavor than the others (and led to the Great October Revolution of 1917 with its ideological thunder).
Overall, there’s a case to be made that wars are just about power and that they’re rationalized in terms of the language of the day—ego, greed, God, honor—merely to justify all the death and destruction they cause.