We have no way of knowing why your husband's nephews are doing this but it doesn't matter that much and is certainly nothing to get so mad about because these are only your husband's nephews, not even very close relatives. If they don't treat your family unit right, I'd quietly back off from them, that's all--- and I'd take my family with me.
My family is the one I care about the most, by far. I don't allow outsiders to drive wedges between us or pick and choose which of us they'll include and which they won't, pit us against each other etc. That gives them far too much power, which apparently some people just can't get enough of. That sort of thing has happened before with us and they found themselves quietly not included in MY family. Well, it took a while to catch on and to come up with our ground rules for that sort of thing but now it's automatic.
So, your younger daughter is a child, no one who should be calling the shots based on some imaginary idea you may have of the terrible things that will happen if she doesn't get her own way. Her not going to a cousin's wedding is not nearly as big of a deal as her being allowed to not side with her nuclear family and her sister. She's very young and won't know this if you don't teach it to her. Of course people like that look for the "weakest link," someone who is the easiest to use to drive a wedge so it's not surprising it's the youngest family member. She needs to be out of this, not used like a pawn in their weird games.
So, I suggest that you simply, calmly, stop this mess right now and do the same if anything like it comes up again in the future. Your husband sounds like he's pretty much ready to do whatever you want about it, so you've got this. Now, politely send your regrets for the wedding from your entire family. No reason is needed. You tried giving a reason last time and it worked against you, so now doing so can be considered a trap. Therefore, no more reasons. Your business can stay within your four family members. Others aren't to be given any information if they show they aren't on the side of your family unit and don't act appropriately with what they're told.
I'd plan a nice family trip for four that includes the date of the wedding. Tell your second CHILD that she can't go to the wedding because you four will be on a family trip during that time. And don't take it too seriously if she throws a fit. She's a kid and one who has been dragged into a tug-of-war she doesn't understand. Just send her to her room or something and get on with your life. It's been allowed to become too big of a thing, too much drama surrounding it. And if there's anything that draws young girls more than anything, it's drama. If it's not a big deal to you, it soon won't be a big deal to her, either, I'd wager. She's just picking up on all the tension surrounding the whole wedding issue.
See, you already tried letting daughter number two have what was allegedly "her" way and accept her invitation. It didn't work out so well. It didn't bring about any better results this time, just another attempt to drive a wedge through the middle of YOUR family. So that's the end of that. You tried but now, I'd say to remember that you, your husband and her sister are your younger daughter's main family, by far. Everybody else is a far second, and farther than that if they don't respect and honor your family unit, which they are not doing. Your younger daughter hasn't learned that yet because you have not modelled it nor acted as if you completely believe it yourself. But now you have another chance to do so, after trying to keep the peace. I'd also keep her doing things with you far more than hanging out at her grandmother's house, if her grandmother is part of trying to drive a wedge in YOUR family. Best wishes. :)