2001 Mustang GT with a 6.8L Triton V10 swap from an old farm truck The Mustang still isn't running great, P0340 code for cam shaft position sensor. I think the issue is in the wiring harness. Let me know if you have any ideas to fix it.
id start by getting a wire schematic of the old truck. then check all your ground wires and make sure to run a ground from the engine to the chassis if you haven't already. just use the K.I.S.S. method. (keep it simple stupid) first grounds, fuel pressure, a data logger to get into the sensors and see what the sensors, fuel trims and what the timing is doing would also help. Good luck!
Ford did this as a prototype back when new edge firsr c0ame out. They used a aluminum block with cobra r v10 heads (impossible to find). It had a crossflow dual intake. Powered by 2 ecm's. One for each bank. NA it made nearly 500 horspower. Thanks to Obama this was shelved and a good reason why new edges didn't come with loads of hp from factory.
Sounds like fuel delivery problem. What year v10, some years uses consistent rate pump, and fpr, some years used computer controlled pump pressure and fuel pressure sensor