The problem with the penalty area melee at a corner is that it is not an even playing field. Attacker fouls a defender - it’s a free kick that’s no more dangerous than a goal kick. Defender fouls an attacker - it’s a penalty and very likely a goal.
Forwards foul every bit as often as defenders do. They are all at it. Very often the referee will see both sides fouling. What does he give?
Likewise, an attacker handles the ball into the net - it’s a yellow card. A defender handles the ball to stop it going in - it’s a penalty and a red card. Why the difference?
As an (ex) defender, it all seems most unjust to me!