I'm working on a book, Binary Logic: The Power of Incoherence in American Sex Science (under contract with Duke University Press), about how sex functioned as a scientifically-backed method of sorting bodies in the 19th and 20th centuries because it could contain multitudes. Sex could be defined by all kinds of things—external anatomy, internal anatomy, hormones, metabolic rate, chromosomes, behavior—depending on the research question or social argument at hand, and often worked with several conflicting definitions simultaneously. A key part of those conflicting yet coexisting models of those sex was the fact that sex operated as both a self-evident binary of male and female and a far more complex gradation on the cutting edge of scientific inquiry.
The book is fundamentally an assertion that norms of binary sex took a lot of work to construct, and take a lot of work to maintain—essentially, it's a prehistory of cisness. While some bodies that weren't easily classified as male or female were occasionally cast out of those categories as pathological anomalies, the book focuses on how scientists and medical doctors brought all kinds of exceptions back into normative sex categories without damage to the system of sex itself. It follows a sprawling cast of mostly American researchers through zoology, eugenics, gynecology, statistical studies of sex, and transgender medicine as they self-fashioned their expertise, created enmeshed fields of sex science and race science, and made science the way to know sex.