"stern deck of a ship," c.1400, from Middle French poupe "stern of a ship" (14c.), from Old Provençal or Italian poppa, from Latin puppis "poop, stern," of uncertain origin. Poop deck attested by 1779.
"excrement," 1744, a children's euphemism, probably of imitative origin. The verb in this sense is from 1903. Cf. the same word in the sense "to break wind softly," attested from 1721, earlier "to make a short blast on a horn" (late 14c.). Meaning "stupid or dull person" is from 1915. Pooper-scooper attested from 1970.