I was able to figure out the problem.
First I used
ls -laO which showed the flags for all files. It turns out that both
uchg had been added to the files. To override these, I did:
sudo chflags nouchg /Applications/Karabiner-Elements.app sudo chflags noschg /Applications/Karabiner-Elements.app
This unlocked both flags and allowed me to delete the files.
Thanks everyone for your help.