You might be able to over-pressure the downstream piping, or you might not. Your suction piping is presumed capable of handling this high pressure- if not, it will be damaged whether the pump is running or not.
If the suction pressure rises to 40 bar and the discharge pressure is relieved back to the suction, you are not protected if the suction pressure rises. You need the relief valve to discharge elsewhere. And yes, you should have relief on the discharge PIPING of any PD pump which is capable of a pressure at dead-head which can damage the piping or downstream equipment.
If it is a hydraulic diaphragm pump, the internal hydraulic relief that such pumps usually have, is referenced to atmosphere rather than to suction pressure. If it is set properly, once the hydraulic relief pressure is reached, the pump will simply stop pumping hydraulic oil to the diaphragm and the diaphragm will cease to move. However, you should NOT rely on that internal hydraulic relief to protect anything other than the pump itself.
The pump itself is unlikely to be damaged, but that depends on design and you need to verify that with the manufacturer.