Some aspects of MK planking has answers, even if it's character specific. However, there is no universal counter or character vs planking that can SOUNDLY defeat it to the point where MK does not need to be limited on the edge.
MK obtains an extremely powerful position from the edge that other characters tend not to get, because his kit makes strong use of the edge. The edge even without invincibility is a strong position for MK to be in. However, getting invincibility is a major hindrance for stopping him from abusing the edge.
It would work both ways, an asset to be invincible for planking and for anti planking, except that you have noticeable edge grab lag. This lag is more beneficial to the planking side than the anti planking side hands down. In fact, the only upside of having lag when grabbing the edge is that you can naturally edge hog for longer. Because of this, using the very tool that turns MK into a monster on the edge, which is the edge itself, is fairly ineffective even for the stronger anti planking characters (Pikachu gets a strong mention because he bypasses some of the lag and gets to move sooner).
MK has 10+ options from the edge. Each of these options has an answer, but the criteria for being ABLE to meet that answer is so absurd that it's frankly not fair to tell someone "you have to predict ahead of time these exact responses, including delays mixups and anything else used to reasonably deviate in option, have a capable character (the list changes for each option, but remains small in all but a very select few cases), AND be in the correct position to punish that specific option (if you aren't in the right place "at the right time", you can't expect to punish the option made).
It's like a very skewed RPS. MK picks Rock, and it beats Scissors, plastic, brittle metal, wood stick, hand, and ONLY loses to a very specific sized brown parchment paper that not many places carry. AND you have to have this paper the exact instant he throws out rock. Paper too early and you just wasted it. Paper too late and Rock smashed into your face.
Even IF you're someone willing to drive down to that folsky old time shop with this hard to find paper, after all these trials and tribulations, MK doesn't EVEN HAVE TO THROW OUT ROCK.
That's what it feels like. I don't know how anybody could WILLINGLY want to be on the other end of that.