My personal theory based on nothing more than the vibe of the thing is that it comes from the Malay/Indonesian word ‘kecap’ (which is pronounced almost identically to “ketchup”), the word for sweet soy sauce. This is soy sauce that is thickened and sweetened with palm sugar, and I could see European cooks attempting to replicate it based on the vague descriptions given by sailors, and ending up with ketchup.
Interesting, thank you.
It came from the Malay word, but the Malay word comes from Hokkien.