Yup exactly. He just lacked emotional subroutines (at first) and the hardware to process that. But he doesn’t need emotions to kill. He is in fact capable of using lethal force (First Contact), he just has an ethical subroutine that prevents killing (Descent I, II) unless in defense of others, himself, or The Federation. Which would fall under his logical subroutines.
Similar in a way to Chief Engineer Hemmer who will not use violence (Memento Mori) unless in an act of preserving life. The means to defend is part of the training of a Starfleet officer.