TLDR; can incorrect gaps in spark plugs cause an engine fire? Would not plugging the wiring harnesses in correctly cause an engine fire? Would a loose fuel rail cause an engine fire?

I recently had a code come up in my 2017 Ram Promaster 2500 for a bad fuel injector + random misfire. I purchased a new set of injectors and spark plugs, and a single ignition coil for the cylinder that misfired (just in case), and did the replacements myself. I have mechanics in the family and called/shared the YouTube video I was working off of and was told it was straight forward, given some bits of advice, and went into it feeling confident.

When I started my car after doing the work, the engine ended up catching fire. At first the engine ran extremely rough, obviously misfiring, and I was immediately getting messages on the dash that said “ESC Service” and “Service Hill Holder”, and the check engine light came on. The exhaust was kicking out a lot of white smoke. I knew something was terribly wrong and wanted to turn the car off immediately, but the person I was working with told me the van just needed to run the fuel through and it would be fine. We ended up having the van on for about 3 minutes before the engine caught on fire.

I have a couple of guesses as to what went wrong. First, there was a terribly corroded bolt that I could not get in all the way on the fuel rail. I purchased a new bolt, but even then it seemed the threads had been badly corroded and I could not get the bolt to sit. It was 1 of 4 bolts on the fuel rail. I wonder if this caused a fuel leak which started the fire? Second, the hill holder message on the dash leads me to believe something was wrong with the electrical wiring from the moment I turned the van back on. Could it have been an electrical fire from not plugging something in correctly? The fire started AGAIN after I had already turned the car off and extinguished it, and only went out completely after disconnecting the battery. Third, the spark plugs had been pre gapped at the exact measurement I needed, supposedly, but when I checked they seemed a little off. I tried to use the gap gauge to get them to the correct gap, it only ate away at the gauge. I read online that iridium spark plug gaps should not be messed with and decided to leave them. Additionally, I did not use a torque wrench as I had gotten the advice from a mechanic friend and a YouTube video to just turn t until it was tight and turn it a little more. Is it possible that a bad spark plug gap/torque could have caused the engine fire?

I was able to put the fire out within a few minutes and the damage looks fairly minimal, without taking whole thing apart again (I can see some crispy wires, and I imagine the plenum and fuel rail are toast based on where the fire seemed to be burning , but that’s about it).

Any thoughts on what the repairs might look like? I won’t be DIYing at this point as I have zero confidence in myself any longer, but I’d like to have an idea before I send it to a shop. Feedback much appreciated, thank you!