Origins of "off the deep end"

Anyone know where that term originated?

US Navy… broken machinery was often ditched by dropping it off the stern of the boat rather than haul it back to port… the explanation being that it broke loose of its moorings and fell “off the deep end”… that was a sort of officialese that everyone knew, wink wink, nobody along the chain of command wanted to deal with said hunk of junk…

an alternate proposed explanation:

“To go off the deep end “lose control of oneself” is slang first recorded 1921, probably in reference to the deep end of a swimming pool, where a person on the surface can no longer touch bottom. When 3-D films seemed destined to be the next wave and the biggest thing to hit cinema since “talkies,” they were known as deepies (1953). The gods have spared us.”