It is easier to just send in your own ECU for repair. That way you do not have to mess with a new ignition switch, etc. Like these people:
https://www.ebay.com/itm/REPAIR-SERVICE ... zG&vxp=mtr
I used a place called myairbags.com and they did well. You should get a lifetime warranty on the fix.
The idle valve is correct, but I would suggest getting a Hitachi - they make the OEM IACV. Most of the others are non-branded parts from China.
After you replace the parts, check all your fuses, then start the truck. You then need to do an idle relearn procedure. You can find the procedure in threads here by doing a search.
Do take the time to look closely at the wiring harness at the ECU and check for any signs of burned wiring, altho I would say that usually does not happen. Also check the wiring at the IACV when you replace it.
What was the shreds of metal thing all about? Was the engine running ok before the ECU bit the dust?