In my view engineers should never take part in R&D related to the military. I think military technology advancements take society towards conflicts and wars.
The only profession calculating the prosperity of a society is engineering, unlike doctors and lawyers whose large numbers indicate more patients and unrest in society respectively.
Furthermore, in countries like Pakistan, engineers are not supposed to take compulsory to participate in military-related R&D because we have a well-sufficient army in terms of active personnel.