I recommend that you check the filters and lines of the diesel, make sure they are not clogged, since a tank or a line of obstructed diesel causes the injectors to fail starting to throw white smoke and loss of strength.
If your pump is a Delphi, your problem is the advance control valve if you say when it is disconnected, but rattle, it means that the advance variator does not work and the problem as I said is just the electric valve
The solenoid that you say is the advance control valve and that is the one that is failing you just have to change it and they are no longer the injectors or anything similar that magnetic valve controls the advance of progress in the pump so it is that it boot