Kaput sounds like the noise of something breaking. It actually comes from a scoring term in an old French card game.
Piquet is a two-player game played with a 32-card pack, recorded in English from the 1640s. In piquet, a hand where one player took every trick was a capot. French used the word for both sides of the table. Merriam-Webster and Etymonline agree that faire capot meant winning all the tricks, while être capot meant losing them all.
German players borrowed the phrase as capot machen, a partial translation of the French. According to Chambers Dictionary of Etymology, the German adjective kaputt was probably abstracted from that phrase. Etymonline suggests the Germans misunderstood the French expression along the way. Either way, German applied the word only to the loser: wiped out, ruined, finished. Etymonline dates that German sense to the 1640s.
English had already met the card term directly. Merriam-Webster still lists capot as a noun for winning all the tricks at piquet and other games. Kaput arrived much later, by the German route.
The Oxford English Dictionary's first example of kaput is from 1895, in William Martin Conway's mountaineering book The Alps From End to End. Conway mixes English and German: "the man would be kaput at once." At that point it was still clearly a German word in an English sentence. Etymonline says it was popularized in English during World War I.
By 1924 it had broadened to anything that had stopped working. The OED's next example, from the Glasgow Herald in December 1924, reads: "The intellectual consciousness is kaput." Today dictionaries give three senses: utterly finished or destroyed, unable to function, and hopelessly outmoded. The OED still labels it slang, while most other dictionaries call it informal. The German spelling kaputt survives as a less common variant in English.