Your latching circuit design will briefly apply up to 10V to U1 pin 1, when the switch is released, due to the action of C1. Since the chip's absolute maximum input voltage is 6.5V, this will damage or destroy the chip, as evidenced by the burning and smoking you observed. The example latching circuit you referenced calls for a CMOS logic gate such as CD4011, which has a 3V to 18V supply range, and can tolerate a 10V pulse. But your circuit uses a 74LVC00, which can't.