This guy is from a dishwasher control panel. I'm having trouble finding a replacement for the entire control unit (that will ship to Japan, anyway) and I am handy with a soldering iron.
Can you take a stab at what you think it might be?
It's made by ST Microelectronics based on Logo.
The package is indeed DPAK (TO-252)
Based on the pinout, it's not a MOSFET (either P or N). All of the ST MOSFETs in DPAK have the gate on pin 1 (lower right in the picture orientation), which makes no sense. The control line of this device is pin 3.
This leaves something like a TRIAC or SCR. The DPAK offerings from ST do have their control line an pin 3, so that looks good.
Beyond that with the markings gone it is hard to tell.
Based on other DPAK parts, the part number is split onto two lines. The first line is the series number, the second line is the rest of the part number.
From your part we can make out very little
The exact number of digits vary.
One option that fits that bill are the T4 series 4A logic level Triacs. These have part numbers that seem to match. For example this one looks pretty darn close to your image.
Looking closer at your image, we can make out something just before the 4 on the first line which could well be the