Re: There's nothing illegal in writing the code
If instead of providing some software, the engineer provided a physical tool for someone to use in a burglary, or even lent them a vehicle to use as a getaway car, would they be committing a crime?
Another example is providing firearms to mentally ill people in the USA.