i doubt its ecu or tcu related. honda auto trannies are garbage. mine did exactly what yours did, slipping intermitently, d4 flashing, then one day it just took a shit and wouldnt move/shift no matter what i did. i took out the tranny and took it apart and found out that the clutch packs were all ****ed up after the 2-3yrs of nitrous usage and the filter screen was clogged to death and not allowing enough aft pressure run through the tranny. i decided to convert to a 5spd and im loving it. the process of doing the conversion is a pain in the ass with the engine still in the bay but its all worth it now.
dumping the my exedy cerametallic racing clutch + nitrous launching out of the hole is awesome now i just need some traction.