Bit of an update on this:
I got myself a replacement secondhand ecu, ews and key. While it worked and the misfire was gone, it wasn't happy. It took longer to start, previously it would start immediately after only a second of cranking but now it was taking much longer to start. Then after a minute or so of running it threw out a load of new fault codes, to do with map sensors, O2 sensors and the like. The replacement ecu, while being from a manual 330i did not have the same part number as my original one, I think it must have been an earlier or later ecu that wasn't happy with the other older or newer parts in my car.
By this time I had got my E30 moted so had started using that as my daily while I worked out how to fix the E46, so it sat there for a few weeks getting covered in pigeon poo. My E30 however does not have air con and as I'm going away this weekend I started thinking about trying to get it running again earlier this week.
I thought up a plan to fix it. I was pretty sure that the only problem with my original ecu was that it had a broken pin. I also remembered that when I was looking at the pin designations for the ECU sockets/plugs that there were a few pins that are not used. So decided to take my ecu apart to see if it was possible to rewire it as I knew from removing the broken pin from the plug that relocating one of the wires in the plug was relatively simple.
So I soldered a wire from the contact of pin 32 (the broken one), then found an unused one, pin 50, on the top row of the socket (as it was easy to access) and soldered the wire to this.

[/url]

[/url]
I could have soldered the wire to the contact on the bottom of the PCB for pin 50 but it was easier to solder it onto the relatively large wire from the socket to the PCB. And there was a handy hole in the PCB that the wire could pass through.
All I then had to do was relocate the wire in the plug from 32 to 50 and of course put the original ews back in and the chip in the key. And it worked! It's running nice and smoothly, no misfire and no fault codes.