You can't declare on hre member if fighting the emperor. If emp doesn't ally electors at all and you can't, it's impossible to dismantle the hre, unless you put them all in a coalition which some never want to join or just conquer it outright, which defeats the point of a separate dismantle option.
This is of course the dumbest thing ever, even outside 'dismantle the HRE' problems. If I'm a nation at war with the emperor, I don't care at all about the emperor's problems defending yet another one of HRE princes. What is it, exactly, that prevents you from declaring that war?
I mean, yeah, there are some minor game mechanics issues.
-The game could let the emperor choose to defend the secondary war target, putting the emperor against you in both wars. While this makes warscore a little weirder, the sensical approach is to count the emperor's warscore contributions to *both wars* when it makes sense to do so. (ie, battle performance against any nation involved in both wars, holding provinces of any nation involved in both wars, and its provinces being held by any nation involved in both wars). Of course, there's no reason to limit this to just the HRE emperor either - why not let nations fight on opposite sides of another nation in multiple simultaneous wars? What it really does is raises the stakes, because to the doubly-involved nations, all the wars are the same war.
-The game could let you expand the scope of a war by declaring a new cobelligerent while the war is in progress. This would add the newly declared on HRE state to the current war. Probably simpler to code, but it becomes a question of who gets to choose scope, and it models historical processes worse than the first option.
(Obviously the belligerent aggressor gets access to increasing scope, but what about allied aggressor nations? Historically they have dragged other nations into wars on their own. What about the belligerent defenders? Can they increase the scope of a war? There's some historical precedent. Regardless, it's a worse model because sometimes an allied nation has dragged in additional nations to a war who were never at war with all belligerent nations - separate wars featuring some of the same nations on both sides models this a lot better).