I don't think weapons are immoral. I think they can be used in an immoral way but the weapons themselves are designed to fit a situational purpose.
Artillery can kill massed troops or individual snipers, depending on the situation.
I've always followed the concept of sanctuary. If an enemy is surrendering w/o a fight he should be showed mercy and given sanctuary as a prisoner. If he is wounded in battle and surrenders, same thing. If he puts up a hellacious fight and kills a lot of your men and then decides he has no place to go, it's unlikely he would be taken alive.
I've only experienced this once. Unarmed enemy troops retreating past our armored vehicles. It would have been immoral to kill them and we paid them no mind. Thier commrades in vehicles who were firing at us were shown no mercy. Many were killed with 25mm cannon fire. An effective but not immoral weapon against lightly armored troops. A-10's also hit them with 30mm HV rounds. Not immoral imo, simply available at the time.
The use of nukes raise the stakes considerably. They should only be considered under the most grevious circumstances.