A Starlog interview with one of the original writers (I can't remember if it was Lucas or perhaps Kandel) made mention of the proposed storyline, called, iirc, "Deep Mudd."
Sir Rhosis
EDIT: Just looked it up -- mea culpa. Stephen Kandel developed "Deep Mudd" for TOS, not TNG.
SR