I guess your question is more about the jack part.

In English a jack is by-name for a common person.

In British English, jack is a very old (13th century) term to designate the average peasant - the man at the bottom of the social pyramid. See for instance colloquial expressions such as "every man jack".

In that sense it comes from Old French "jacques" which has the same meaning - "Jacques" being a very common first name in medieval France at the time. The revolt of the French peasantry during the Hundred Years' War was famously called the "Jacquerie" because the jacques were all in arms and busy burning castles.

It also gave English the word "jacket" that was then adopted back in French as "jaquette" (the lost "c" and the meaning of a typically classy suit is a tell-tale sign it does not come directly from Old French).

During the British naval supremacy period, jack was also used to designate the average seaman.

The word must have somehow passed into American English. See for instance "lumberjack" for "lumberman".

So in addition to the word "shit" symbol of something of little value, the use of jack here reinforces that meaning by referring to an average fellow of supposedly low level of sophistication or knowledge.

Another very close way to see things is that "jack-sth" is used to denote a smaller version of this something. The OED says:

applied to things of smaller than the normal size; [...] jack-bowl, jack-brick, jack-fish"

So you get the idea: a jack shit is of even less value than a regular-size one (who can claim now that EL&U is not an instructive forum ?).

To redeem myself, let me just mention one of the proposed etymologies of the name "Union Jack" (quoted from the OED) as this is a related matter: