Only runs 40 Degrees advanced

I saw in an earlier post that you finally told us that you are using a stock harmonic balancer.
If you look at the face of the balancer you will note that it is made up of two pieces the inner hub and the outer ring sandwiched between the two is a thin piece of rubber.
When your engine came to abrupt halt the hub stopped and the other ring keep turning.
The outer ring has the timing marks on it, hence your off 5 degrees.
Your balancer is now junk, get it off the engine before it causes more damage.
Purchase a quality one piece after market balancer with etched timing marks.
This will help your issue but IMO it wont solve it.
I think when your engine suddenly stopped while making weird sounds it caused internal damage that's going to require you to dig deep for answers
IMO this is not a simple ignition or fuel delivery problem.