The whole thing is only fit for the trash can.
Forensic inspection of the PCB images reveals details of the case, and how much effort the OP already invested to rescue the victim. Key to the story are the timestamps in the bottom right corners. The last two pictures are the first, reflecting the state of affairs at 1:17 PM and 1:18 PM (it all happened on September 15, 2024): The presumed optocoupler lost a large fraction of the upper half of the mold, only a small corner left (black; white area is no reflection). Furthermore, D5 is soldered with leads extremely long, unlikely for the unaltered product. IRF740 has no heat sink. Q2 and Q3 are gone, visible because the flat side of the TO-92s is not flat anymore. At 2:46 PM, 2nd image, IRF740 (Q1) is missing (PCB visibly burned below!), D5 has been soldered in properly, and Q2/Q3 now look like complete TO-92s. At 8:45 PM, 1st image in the post, we see a new opto, visible from the flux and a solder blob around it, IRF740 is back and with heat sink, some resistors desoldered, together with D1 and D3. Hmm. How much magic smoke did escape in this case?
Sometimes it's better to say goodbye, CaptDon gave an example, this is another one. Telling the full story from start would also have been a good idea...