The phrase “touch and go” means: An uncertain, risky, or precarious state of things, a narrow escape; also, an immediate or rapid action.
The expression arose in the early years of the past century, and both interpretations were in vogue from the beginning, probably because any narrow escape is averted through immediate or rapid action.
For the origin, probably Admiral William H. Smyth was right in his definition of the term in The Sailor’s Word-book (1865):
“Said of anything within an ace of ruin; as in rounding a ship very narrowly to escape rocks, &c, or when, under sail, she rubs against the ground with her keel, without much diminution of her velocity.”