A similar thing happened to me a long time ago. Starter came loose during a race. Went to crank it later and POOF!

The only thing that saved me from severe damage was the negative battery cable to the chassis at the rear of the car was 2 sizes smaller than the positive. The negative cable popped like a fuse. Positive cable was fine. If they were the same size i could have easily lit up the positive cable running all the way to the front of the car.

I always tell people to make the negative wire smaller and you would think I told them to drop in a Ford 289 instead of a HEMI. If both are the same size the then the load during a short can cause both wires to melt and be devastating.

I bolted the starter back into place and replaced the negative cable. Back in business in less than 5 minutes.

Glad you didn't have anything worse happen.