Tolkien fought in WW1 and it's easy to tell from his writing he was a very sensitive individual. There's not much in LOTR about killing but his notes and the Silmarillion do shed some light on his moral view on the matter of ending a life.
The gang of thugs possessed the Ring of Power, stolen from its rightful owner, and capable of killing millions; it’s like a nuclear bomb!
If some gang of trespassers snuck into your dwelling with a nuclear bomb, I think “shoot first, ask questions later” would be the order of the day.
The only character that seemed to have his shit together was Sauron. Even Sauramon agreed the safest thing to do would be to peacefully return the ring to its rightful owner before anyone got hurt...
That said, I don't believe Tolkien was ever totally comfortable with his treatment of orcs, he just never reconciled his morals and personal narratives with his desire to tell faerie tales and myths, where "evil goblins" are just part of the landscape. No sources for that, though, I just recall reading it somewhere, perhaps in his son's writings...
I write fiction occasionally. When wondering if it’s ‘moral’ or ‘ethical’ for a character to do something repugnant, I often have to remind myself that none of it is real!
The ‘moral’ issue — if there is one — I suppose pertains to the author deliberately holding an immoral character up as an example of good behavior in the ‘real’ world. Maybe even then there is no real moral issue...
Considering that an author is responsible for the morale of their characters is how we end up with boring Marie sues in media.
I was simply observing that it is difficult, as an author, not to feel queasy about writing a character who commits immoral acts.