In 1891, when volume 2 of J.S. Farmer & W.E. Henley, Slang and Its Analogues was published, dick had many slang meanings, including (but by no means limited to or even fundamentally associated with) the genital meaning:
DICK, subs. (common). — 1. A dictionary ; a RICHARD (q.v.) [the entry for Richard simply notes that it means "a dictionary"] ; also by implication, fine language or long words.—See SWALLOW THE DICK. [Citation from 1860 omitted.] 2. (coachman's). — A riding whip. 3. (military). — The penis. For synonyms, see CREAMSTICK. 4. (common). — An adffidavit. [Citations from 1861 omitted.] 5. (American). — An Irish Catholic.—See CRAWTHUMPER.
Verb (thieves'). — To look ; to PIPE (q.v.) ; e.g., the bulky's DICKING = the policeman is watching you. {From the gypsy dikk.} Fr., gaffer. For synonyms, see PIPE.
DICK IN THE GREEN, phr. (thieves') — Weak ; inferior. ...
IN THE REIGN OF QUEEN DICK, adv. phr. (common). — Never ; 'when two Sundays come in a week.' For synonyms, see GREEK CALENDS. [Citation omitted.]
TO SWALLOW THE DICK verb phr. (common). — To use long words without knowledge of their meaning ; TO HIGH FALUTE (American).
UP TO DICK, adv. phr. (common). — Not be 'taken in' ; 'artful' ; 'fly' ; wide-awake. For synonyms, see DOWNY. ...
It is evident from this coverage that dick in the sense of "penis" was in relatively narrow usage (primarily in the military) in 1891, whereas other meanings—alone or in phrases—were far more generally known and used. Indeed, many most of the alternatives meanings could not very well coexist with the genital meaning. It may be have been insulting in 1891 to say that someone had "swallowed the dick[tionary]"—but today the phrase would be untenable.
It's interesting to note the verb sense of dick as "looking or watching" (supposedly from a Romany word), since this would seem to provide a pathway to the noun dick meaning "guard or watchman," as in the W.C. Fields movie The Bank Dick.
Stepping back two decades earlier, the genitalia meaning is nowhere to be found. John Hotten, The Slang Dictionary: Etymological, Historical, and Anecdotal (1874) offers only these definitions:
Dick, a riding whip ; gold-headed DICK, one so ornamented.
Dick, abbreviation of "Dictionary," but often euphemistically rendered "Richard,"—fine language, long words. A man who uses fine words without much judgment is said to have "swallowed the DICK."
The earliest citation for dick in the sense of "penis" in J.E. Lighter, The Random House Historical Dictionary of American Slang (1997) is from a book titled Stag Party, published circa 1888, according to Lighter. The cited example there unmistakably uses dick in its genital sense.