In some ways he is a lesson on how we can not fix our own mistakes but must seek forgiveness and then accept what punishment is dealt out. Self punishment does no good.
As for Pontius Pilate who knows? Maybe he found his way to the Savior before his death.
In both cases they knowingly did wrong. That God took what they meant for evil and used it for good does not change that.
thanks, I never thought of Judas as a lesson about not trying to fix our own mistakes...