The evolution and absorption of hardware terminology into modern systems and software usage is an interesting one. For many, the true etymology was lost before many of us were even born. In most cases, the original meanings of words have been adopted to have similar technical meaning. For instance, we don't give "memory" a second thought, despite the fact the mechanisms for achieving data storage and retrieval in hardware varies significantly, and all are substantively different than that of human memory.
In the absence of historical evidence to the contrary, we should look at the English definition of the word trap (emphasis is mine):
1 a contrivance used for catching game or other animals, as a mechanical device that springs shut suddenly.
Consider the electrical engineer (EE) who designed the first trap circuit. What was the design goal and how did they achieve it? I believe it was either the HALT or TRAP instruction, or the effect of the first fault detector; which originally was designed to halt execution of electromechanical computing or control devices when software or hardware detection of any state which could result in damaged hardware or loss of resources, that was the progenitor of these terms into the systems software lexicon.
The first programs ever written, were punched into leather belts that controlled steam driven looms. The primary drive wheel to which the steam piston or cylinder was attached, were often made of Iron or wood and > 8' in diameter (I worked on a mill once, with a 16' cast iron drive wheel) and could not be stopped quickly, due to inertia. If there was a failure (fault) of the leather control belt (the program), a mechanical device would "immediately" disengage the drive belt from the machine to which it was attached, and in some cases, a break would be applied at that machine. In that era, the lexicon was driven by mechanical engineers (ME's) and millwrights, not unfamiliar with the use of mechanical traps for catching game or vermin.
Fast forward about 75 years to that EE designing the first fault detection and trapping circuits back in the late 1930's or early 1940's. I believe a search of the earliest computing hardware patents would probably turn up some of the earliest mentions of faults and traps in relation to computing devices. Most of the earliest systems software lexicon was adopted from that first generation of EE's and their proteges.