Sounds like you have a vacuum problem. If the engine shuts off with the key, it's not that big of a vacuum problem. Transmission shifts have to be sorted. Make sure there's adequate vacuum to the vacuum control valve (VCV) that hangs off the driver side of the injection pump. Source vacuum goes into the taller aft fitting. The vacuum signal to the transmission modulator on the driver side of the transmission connects to the VCV forward fitting with the geen cylinder. The black line on the side of the VCV is of no consequence.
As for the wastegate, if sorting other vacuum leaks and issues doesn't bring back the power, consider if it's worth diagnosing rather than just putting matters back in nature's hands -
Wastegate actuator swap for OM602.962?
Sixto
87 300D