Back in 3rd Edition D&D there was a spell called "Holy Word" that could kill non-good creatures within a 40 foot radius of the caster, if the caster was sufficiently high level relative to the creatures. Good creatures were completely unaffected.
When tightly packed you can fit about 2000 people into a 40-foot-radius circle (total area is 5000 square feet). So one casting can deal with the population of a good-sized town. My gaming group speculated for a while about a society where it was a routine ritual to round up all the peasantry and nuke them with Holy Word to keep the population clear of evil. Never incorporated it into any campaigns, though. It's a bit of a sticky philosophical puzzler.
The sword's power changes with time, and as it racks up more kills. Soon, it gains a +1 to attack and damage. Then, it can become wreathed in flame as a bonus action. Then, it grants advantage to checks made to locate creatures. Then, its base power inverts and it can only kill non-evil creatures.
Do not tell the player about that last one. Insist to the player that it works exactly as you first described. The Paladin can kill innocent shopkeepers and little old ladies, but cannot kill this assassin working for the BBEG.
Will he question his own stab-first ask-later methods? Or will he turn evil without even noticing?
Have him stab the mayor who's evil because he's greedy and selfish and borderline abusive in trade-deals with neighboring regions but is otherwise beloved (and has rewards heaped on him) because he's so good at actually keeping order in the town and keeping their goodwill (although probably at least a little bit through some passive-aggressive blackmail). That's always fun.
If one were to base their diet around moral responsibility, would eating only what the blade can cut be reasonable? Can it cut vegetables? Can animals be evil? Would training a cow to be evil in order to avoid starvation be morally justifiable?
Mine just stood stock still staring at people for 24 seconds before starting a conversation, detecting good/evil/law/chaos. Made for some very fun roleplay.