I have grown interested in double Machine Learning (ML) for causal inference because it answers an intuitive question: if the relationship between a variable $X$ (the treatment) and a variable $Y$ (the outcome) is confounded by a third variable $Z$ (the confounder), can't we extract some unconfounded signal to get an unbiased estimate of $X$ on $Y$?
That's what double ML does! By extracting the residuals $\epsilon_{X}$ and $\epsilon_{Y}$ (from the regressions of $X$ and $Y$ on $Z$), we "purify" the effect of $Z$ on $X$ and $Y$. We can then estimate the effect of $X$ on $Y$ from those residuals which are, by construction, unconfounded.
However, as I wanted to apply this at work, I rapidly stumbled upon another difficulty: how can we apply this approach when the treatment $X$ or the outcome $Y$ is a binary variable?
In this book, it is recommended to not use double ML in a binary outcome context (but I even fail to see how it can implemented) : "If the treatment or the outcome is binary, one might think it is better to replace the machine learning regression models for their classification versions. However, this does not work. The theory of orthogonalization only functions under regression models, similarly with what we’ve seen a long time ago when talking about Instrumental Variables. To be honest, it is not that the model will fail miserably if you replace regression by classification, but I would advise against it."
Is there any workaround solution in this case?