Loose wire caused significant blackening in plug. How much do I need to inspect/replace?
L5 is rare in residential.  L5 and hardwiring would increase cost to maintain the dishwasher or disposal down the line.

I would trim the cord like you're thinking, and replace the outlet too.  But I'd say you should install a GFCI there instead of hard wiring it, and here's why:

The dishwasher and disposal both are obviously going to be in contact with a lot of water which (if they break) could leak current to ground through your plumbing (bad bad bad).

It's handy to be able to unplug these things in a pinch, and it's nice to have a second outlet there in case you need to plug in a power tool or a charger or something later.

Unless you would have to move the dishwasher to reach the outlet, replace that L5 with a GFCI.