The Dreaded P0340

So I recently did a frame swap, but a week before I replaced the OPDA with a crown opda, synced it up with a tool like you did to move it back to <0.5 degress cam/crank, reused original sensors etc. Had no problems whatsoever, jeep drove great. However, once I did the frame swap and buttoned everything back up, same thing. First start was no oil pressure, second start was good. Happens everytime, after the first start, kill it, restart within 30 secs and good pressure. Since then, I replaced timing chain and sprockets, oil pump, oil pressure sending unit (with mopar), and I'm still having the same problem. I've found one thread that describes the same issue where first start no oil pressure, second start is good and their fix was replacing the sending unit. Didn't work for me. I had to replace some vacuum lines going into the intake manifold and that solved my high/weird idle issues, but sounds like you've already gone through these. If you are having the same sort of issue, where every single time no pressure on first start, and only second, well I haven't found a solution yet, and besides a weird pcm or computer issue (mine is a WranglerFix), I'm really not even sure where to go next.

Intermittent and/or strange electrical behavior can often be a bad ground. In your case would be suspect of that. Those old OEM ground straps only last so long, and connections get corroded. Was yours reconnected after swap?

Are you getting 5 volts to the sensor reliably - and when the issue occurs?

You could also try back probing the oil sensor - check all readings while the problem is occurring - and try supplying it a direct to battery ground while it is malfunctioning - see if that makes a difference. Do you have the needle like adapters for a voltmeter that aid in back probing?

Less likely scenario - I read of a case where the 5v supply from pcm registered on meter - but somewhere in the line (owner never found where) must have been a bad connection. It registered the voltage...but (I surmise) was not carrying the amperage (as small as that likely is) to reliably service the various sensors including OPDA camshaft sensor. I have seen such scenarios on corroded DC wiring in the past. His solution after much headache was to run a new 5v supply wire to each sensor on that circuit, spliced in to pcm connector.
 
I had this pop up on my 05 under similar circumstances, had sat a few weeks and when i went to start it the code popped up.

I replaced the sensor (not the original one based on condition of the plastic wire loom) with a standard brand from Oreilly's, which while it worked for a bit threw the code again after warming up. I noticed that the brass bushing that the bolt goes through stood out a bit more proud than the one on the old sensor, which didn't seat it fully into the OPDA. I used a flat file to file down the bushing so that the sensor seated fully into the hole on the OPDA, and the jeep has cranked right up and run fine every time since.