Misdreavus vs. Porygon can be very prediction reliant, especially if Porygon comes in unscathed.
For one, Porygon can Thunder Wave, if Misdreavus doesn't use Sub, Porygon has a pretty solid chance of winning that fight.
Even if Misdreavus does Sub, there is still the chance that Porygon may have just outright Shadow Balled.
Also, keep in mind Misdreavus has to usually choose between HP Fighting and Dazzling Gleam on the same set. Without HP, Pory and other bulky normals stomp all over Misdreavus. Without DG, mons like Mienfoo and Timburr can check it. Without WoW, it loses a lot of utility and the ability to stop Mienfoo and Pawniard.
So yeah, Misdreavus can beat Porygon. But doings so is not as super easy as some are making it sound.