Luck has nothing to do with it, and it is perfectly possible to predict the potential pile of opponents. It's not like "allied to" information is hidden.
Yeah. The issue here, if there is one, is that the game doesn't go out of its way to present information to you. To predict it accurately, you need knowledge that the game itself won't spell out for you, or in some cases won't tell you at all.
For example, will the CB allow War Leader change? This information is only available in the files, not through any game interface. Though of course it's now also on these forums, and on the Wiki.
If you know it's one that will allow WL change (and I think it's the majority that do,) then you need to know "Who is the war leader likely to switch to?" Again the game gives you no direct answer, nor explains the rules for what factors are taken into account.
I'm pretty sure that WL simply changes to any greater military power, calculated in the same way as the "Relative Military Strength" modifier is. If you're DOWing a nation that's allied to one or more nations that has a much bigger military than it - and the simplest way to check would be via the Army Ledger page, for Total number of troops (probably plus Total Navy) - then there's a good chance that nation will become WL. Then you need to see all of
its allies, and perform the same calculations again.
Whether you think this is awful or awesome is all preference. You certainly get quite a sense of achievement out of working it out - or, better, judging it correctly after just looking through the list of allies, without resorting to pen and paper or even the Ledger. And if you're a small nation and you want to DOW, and you look around your enemies and discount two because you know they will alliance chain, and then correctly pick a third whom you know won't, because of correct CB available, or because its allies won't chain, then you can certainly feel proud of making a difficult strategic decision.
But I understand many players feel that this information should just be provided clearly. I have some sympathy with that. Certainly I think
some further information should be given, likely clearly stating if this DOW will allow War Leader change based on the chosen CB.