Kert, you are controlling the timing with the XFI right? So you have the distributor pickup signal going from the distributor to the XFI ecu and then that triggers the MSD box through the white wire? So why don't you try unhooking the MSD box from the battery and seeing if the rpm signal issues go away? Obviously it won't start but it should tell you whether or not the MSD box is causing electrical noise issues where it is mounted and wired if the RPM signal is suddenly rock solid.
I typically mount any ignition box on the opposite side of the vehicle as the ECU, whether it be under the hood or under the dash. Ignition boxes output a lot of higher voltage stuff sometimes upwards of 4,000 volts going into the coil(after the coil it can be 10x that), and that creates a larger field of electrical noise than any 5v or 12v stuff does.
Also, I assume you have the main power and ground of the ECU directly to the battery, and not to the frame?
What plug wires do you have? I always recommend units that are spiral wound and under 50 ohms/ft to reduce electrical noise after the coil.