I'm not sure whether that would even be possible. For instance, on most Europe / World maps, there are separate territories for Croatia and Bosnia. Because of their shape (Croatia resembling a, rotated, capital letter "V", with Bosnia "caught between"), it would be perfectly possible to perform a flanking attack which only shows up as a single attack in WL. On the other hand, if we take [Troll's Europe](http://warlight.net/SinglePlayer.aspx?PreviewMap=10895
) as example, on the German / Polish border there's quite a few combinations of two attacking territories versus one defending territory (one example: Pomorze Zachodnie and Wielkopolska versus Brandenburg) which, to me, would not "feel" like a flank attack.
So, let's assume we ignore what the map looks like exactly and simply stick to the definition: two different territories attacking the same target.
This would still cause major problems. If we go with your original idea (everything except the "main assault" gets a bonus) then we immediately run into problems: what if the main assault does not occur first? Let's consider two attack (let's call them A and B, just because it's easy). Attack A happens first, with 10 armies, attack B takes place a while later with 20 armies. So attack A should get a bonus, right? But wait, what if attack B never happens? Between A and B another (counter) attack could occur, destroying all armies which would have taken part in attack B. Or even more fun, what should happen if B still takes place, but with far fewer armies; what if 15 armies were destroyed, so B becomes a five-army attack? Then all of a sudden A is the main attack and should not have gotten a bonus.
On the one hand, we could change the rule to "every territory which has already been attacked this round will receive a flank attack penalty on all subsequent attacks", that's a workable solution (it respects causality and is easy enough to code). However, from the other hand, it's a horrible solution because it's far too easy to abuse: first do a 1-army attack on everything you're going to attack this turn, then do all your "real" attacks. Unless you only have one of your territories bordering on an enemy, all your attacks now get the flank attack bonus.
Now, in theory there is a solution (I think... just because I can't quickly find a problem doesn't mean there isn't one!). You could make the rule "any attack which takes place *after* an earlier attack with more armies, will get flank attack bonus". (If we remember the biggest attack so far on each territory, this is still easy to implement.) However, in practice, I'm afraid nobody would be able to really work with this. Just think about it, how often did you plan an attack which, when it finally took place, used a completely different number of armies than originally planned? Or which didn't happen at all? I'm afraid it will feel like some attacks randomly getting a bonus, which would be a pretty bad game mechanic...