Ok here's what's happeneing. Now you have a D17, which is basically different from all the other honda motors, so i don't know where evey part is but basically...
The crank sensor makes perfect sense. What it sounds like is it's reading is getting skewed when it heats up, and it changes the hell out of your ignition timing. I'm guessing the timing is going way retarted. If the timing is very retarded you will have basically no power, and it can cause the motor to get warm (maybe not water temp wise, but it will heat up the engine bay), and then you need to let it cool down. So it definatley sounds like the crank sensor is the culprit, i'm just wondering why it only happens when the car is warm.
__________________
|