.
First off, where are you? As there may be people I can direct you too.
Fact the ecu has been messed with worries me, these ecu's never suffer dry joints, I spend a great deal of time working on them, and that is never an issue. Blown tracks yes, and component failures yes, but always reasons why. In the hands of the unwashed worries me...
Make sure the dizzy cap and rotor arm are Bosch parts only, do not run the cheap copies... mentioned this loads of times.. put cheap in, get crappie results out - period... If you search you will find what I have written up about this before. I know what I am talking about as I have a 2.5 turbo running original ecu, coil driver, and dizzy... makes 387hp, and it was not been easy getting those parts to support it...
TDC sensor is important, and they do degrade, how are you sure it has been replaced by an original part, and also check the wire colours swap either side of the connector in the engine bay: red to white and white to red. Can you post a picture of the tdc sensor cable up to the connector, if it is the right one it will have additional heat protection over braid. The sensor body should also have a heat shield over the top where it mounts.
The ecu runs open loop, and there is no lambda sensor on a D501 GTA on a Renix 1 ecu. You can run with lots of the sensors disconnected, and again I have gone into this before, and have a thread on it (Renix ecus) in the projects section. Critical inputs are the tdc sensor, water temp sensor, and the map sensor... they must be good. You can test the water temp sensor, it screws into the water thermostat housing. I think JohnC has published the sensor table - resistance against temp before, I have it obviously, but you should find it on here as well with Google as your friend.
Make sure your fuel filter is new / good, and the front and rear fuel pumps.. when they get hot they can die off...
Relays as Tony mentioned.
You say the coil pack / driver has been replaced, what with OE or an alternative, as they are NLA as far as I know?
Now, meat and two veg... is the idle bypass valve sticking when it is getting hot, what happens when you disconnect it (connector on the bottom of it, lives on the left side of the engine looking in the back) at idle, does the engine pickup / slow / stay thd same? It may be sticking. If you crack the throttle plate by hand a small touch when at idle stationary, does thd problem go away? If so, likely the idle air bypass...
The fuel regulators are getting old and these can give all sorts of trouble. Best if you can measure the fuel line pressure, but my bet is you are likely to be running rich... does the engine smell rich at idle, and black exhaust? If you disconnect the vacuum line to the reg, does it kill the engine?
Pull the plugs after it has been running rough, and post a picture up here... can then see the mixture...
If the idle / CO pot situated up by the coil pack has been played with then you will be in a mess... again, the uneducated let loose on some of these things is disastrous, unfortunately we live in a digital age, and if it isn't on an OE fault diagnostic reader, or laptop screen they are stuffed... probably best bet is get a good replacement, but again prove what is good with the secondhand parts these days, it's all old, and those pots go noisey...
That should be enough to keep you busy
Pull the plugs, and let's have a look.
Cheers,
Martin