Yes, with a lot of hand waving
As a DM, you have the right and responsibility to shape a compelling narrative, and an aiuchi or 'mutual kill' of important characters or plot elements can be a powerful climax to a storyline. If you need to bend or suspend a few rules to do it, that's fine. You should be cautious of any rules changes that directly affect the players, because that can easily frustrate their expectations or sense of fairness. But if the interactions happen mostly to NPC's, then bend away. For example, if the players specifically quested after the Sword of Kas with the sole intent of using it to destroy the Eye and Hand, they may be very satisfied with the mutual destruction of all three artifacts. If you had players who thought, 'this sword is so cool' and had plans to keep it afterward, adjusting the rules to assure its destruction may seem unfair.
As a possible example
What if the person possessed by the Eye and Hand of Vecna is not completely controlled? Vecna is pulling strings and shaping events, but the corrupted person retains their consciousness and may not realize the extent to which they have become a pawn. Not knowing that the Sword is out there, available to the players, or at a conscious level perhaps not even knowing what the Sword is or that it exists, the NPC bearer of the Eye and Hand makes the following Wish:
"I wish that any weapon used to attack me would be destroyed."
As a PC-use of Wish, that would probably be too powerful. As an NPC use of Wish, in the service of plot, can we hand wave it just enough to work?
Can wishes create future contingencies?
Well, we know that the Wish spell can affect time. One of its explicit uses is to "undo a single recent event" and many of its "off-list" effects are undoing the results of effects in the past, sometimes the distant past1.
We also know that one of its explicit uses is to duplicate any spell of 8th level or lower, and that the 6th level Contingency spell can be set to trigger on events that will happen up to ten days in the future. Further, we know that Wish can explicitly be used to retrieve up to seven characters from ten years in the future (at least if they were sent there by the lair effect of a Sphinx).
So it doesn't seem like too big a stretch for our NPC to make a wish that is contingent on, and triggered by, a future event.
Can a wish spell destroy something?
Interestingly, when they are not restoring or reversing something, most of the known uses of wish, both explicitly in the spell description and off-list in other places, are instead creating something. There simply aren't many examples of a wish being used for pure destruction. Since we know that it can duplicate spells, though, it must have the destructive power of at least a Disintegrate spell (6th level). Since we want to destroy an object ('the weapon I am attacked with') we could consider a contingent-Shatter spell, but that specifically affects only non-magical objects, and clearly the Sword of Kas would be immune to that. Fortunately we do have one official example of Wish being used to destroy something magical, in the Waterdeep: Dungeon of the Mad Mage adventure, where it can:
permanently destroy one of Halaster's gates
So now we have our justification for the recipient of the Eye and Hand having made a naïve wish for any weapon that is used to attack them to be destroyed.
Enter the party with the Sword of Kas. As part of their quest to recover it, they have been advised not to reveal that they have it until the last moment, otherwise the bearer of the Eye and Hand will immediately teleport away (an explicit property of the Hand), deal with the party from afar, take the Sword once they are dead, and then destroy it. They have also learned that the bearer is 'protected from weapons', so they plan their fight around using spells and other non-weapon attacks.
The party conceals the Sword at the beginning of the fight. They bring the bearer to unconsciousness using mostly spell attacks before finally pulling it out and using it to attack the unconscious bearer for the automatic-critical failed death saves. This triggers the bearer's Wish to destroy any weapon used to attack them, but does not interrupt the fatal blow itself.
The bearer is slain, triggering the Eye and Hand's destruction condition:
If the Eye of Vecna and the Hand of Vecna are both attached to the same creature, and that creature is slain by the Sword of Kas, both the eye and the hand burst into flame, turn to ash, and are destroyed forever.
Just after the fatal attack is resolved, the already-triggered wished-for contingent effect resolves, and the power of the Wish destroys the Sword. This then trigger's the Sword's destruction condition:
A creature attuned to both the Eye of Vecna and the Hand of Vecna can use the Wish property of those combined artifacts to unmake the Sword of Kas. The creature must cast the Wish spell and make a Charisma check contested by the Charisma check of the sword. The sword must be within 30 feet of the creature, or the spell fails. If the sword wins the contest, nothing happens, and the Wish spell is wasted. If the sword loses the contest, it is destroyed.
Here we have to interpret the "within 30 feet" to apply when the Sword is destroyed, but not when the wish made by the bearer was made, we have to have a generous interpretation of 'unmake' and not require that the word specifically be used in the wish itself, and we may have to use DM fiat to say that the Sword failed the contested Charisma check.
We have thus destroyed all three artifacts.
And the world was made brighter thereby.
1See What are all of the published "off-label" uses of the Wish spell? and look at how many of the effects under Monster Abilities are variations on Return / Reverse / Restore / Revive.