The term "Dutch wife" is listed as having several somewhat related meanings. Wiktionary describes it as meaning 1) a body-length pillow, 2) a wicker or bamboo tube that someone sleeps in (also called a bamboo wife) 3) a prostitute and 4) a sex doll, and Wikipedia also mentions it being 5) a hot water bottle. Meanwhile, this page claims that a Dutch wife is a real wife, merely an unpleasant one.
The Wikipedia article on Bamboo wife claims without any citation
The origin of the English term "Dutch wife" is thought to be from the Dutch colony of Indonesia where Dutch traders would spend long periods away from their wives.
But I'm a bit skeptical. It seems to be more like one of those Dutch words
Since c.1600, Dutch (adj.) has been a "pejorative label pinned by English speakers on almost anything they regard as inferior, irregular, or contrary to 'normal' (i.e., their own) practice" [Rawson]. E.g. Dutch treat (1887), Dutch uncle (1838), etc. -- probably exceeded in such usage only by Indian and Irish -- reflecting first British commercial and military rivalry and later heavy German immigration to U.S.
(See also this page for a list of them)
When did the term "Dutch wife" originate? Is it likely to have been a "Dutch word" (this isn't a real term, but apparently there's not really a term for putting a nationality in front of a word)? And what was the first meaning of the phrase?