But was it based on that or was it a happy coincidence?
Yes!
Both. During the creation of TOS, they paid a physics student 50 dollar to come up with a realistic way the starship can move. He decided the starship would need two(!) seperate ways of propulsion: One for sub-light, and all the manoevering that would look nice on screen (battles, rendez-vous). And another one to be able to fly from one solar system to the next. An
incredibly fast one, a FTL drive. He decided to use the "warp" drive, because that was the only somewhat realistically achievable option he knew at the time.
This stuff might be very obvious nowadays. But it was
really groundbreaking at the time.
When TNG came on, they routinely consulted with NASA, to chek their science, and get impressions and ideas for real phenomena and new plot ideas. They used a LOT of creative freedom. But that they even did in the first place was (and still is) kind of unique.
The "Warp-10" salamander is obvious junk science, based on what "unknown" and "unforseeable" consequences new ways of propulsion can have. Funny side-note: In the 18th century, with the advance of the steam engine, there were
serious scientists believing humans can't travel as fast as 100 mpH, because it would compress their lungs and they would suffocate. Obvious bull-crap. But at least it started out as a somewhat serious thought experiment on the technical aspect of these matters.
A galaxy-spannung subspace-funghi-network with FTL-transportation capability and human-DNA-compatability on the other hand is clearly the result of a stoned college freshman in the basement, having just read an article by a funghi-expert in a botanic magazine, who just needed to free his mind,
man.