The judgement says that the President has immunity (in certain narrow cases). It does not say that members of the military have immunity for following an unlawful order.
It would also be very easy for a court to decide that executing a political rival is not an official act and deny the President immunity.
It would also be very easy for a court to decide that executing a political rival is not an official act and deny the President immunity.