In the past when I swapped out V8 motors in fuel injected trucks, I would clean the old engine bay out with a pressure sprayer.
Start the engine to make sure I did not fry something...
Then label all the cables / wires with masking tape and a Sharpie to identify where they all went. Once complete take three or four high-resolution digital pictures of your labeling job in the engine bay.
Now remove the "long block" with all the cables in the car if possible!
Reassemble the "long block" in your garage (ideally next to the new engine) so you can have a quick reference point when putting the new block in.
Finally, just put the new block in and try to make the labels match the part. I always had a bear of a time with fuel injected V8 engines because even in the same model year, the wiring would be different or cables to short.
__________________