He KNEW what the potential punishments where before he broke the law. I say that if you care that much about the cause, do the right thing and don't run, stand and fight injustice in court in front of a jury.
You're oscillating back and forth pretty freely between "illegal" and "wrong." If the penalty was his execution and the execution of everybody in his family, would standing trial and losing still be the "right" thing, or would the only "right' option in that case be to not break the law in the first place? What if the penalty was the execution of his family and he was blowing the whistle on secret government-run death camps? You're taking a rather absolutist position here and I'm wondering if you've really thought it through to its logical ends. Is there really no time when it's right to break the law and flee the consequences?
REAL civil disobedience is when you break the law, full knowing the consequences, ready to make your case about how the punishment isn't fair to a jury and if you loose, being punished.
I'd be more inclined to that position if it was actually legal for him to make the case to the jury that what he did was in the national interest or that the law was unjust. Unfortunately, those arguments aren't permitted. Legally, the reasons for doing it aren't relevant. The only question is whether he did it, and he has already admitted to that. There's no "making his case" in this process at all.
The perversity of the situation here is that there are a lot of perfectly reasonable defenses for crimes that are not allowed as a matter of law. If you position hinges on using those defenses in some spectacular manner to lay bare the immorality of the law and make a great public spectacle, you're going to be sorely disappointed when the judge tells you to shut the fuck up and wait for the jury to find you guilty.
Did Rosa Parks say to herself, "I'm going to break the law today and show these people how unfair it is, but when the police show up I'm going to run and hide so they don't punish me!"
If the death penalty was a likely outcome for the infraction, I doubt Rosa Parks would have done it in the first place. She'd probably have kept her head down like everybody else, and we might be sending black people to the back of the bus today.
If we make it so the only way people can do the right thing is to forfeit their lives in exchange, we're going to end up with not a lot of people doing the right thing.