In this study, we consider difference-in-differences models with a common trend assumption that is only valid after conditioning on covariates. We suggest estimators that allow the covariates to enter the model in a very flexible form. In particular, we propose estimation procedures that involve supervised machine learning methods. We derive asymptotic results for new semiparametric and linear model based estimators for repeated cross-sections and panel data and show that they have desirable statistical properties like asymptotic normality and double robustness. Further, we establish a semiparametric efficiency bound for panel difference-in-differences estimation. The proposed semiparametric estimator attains this bound. The usability of the methods is assessed by replicating a study on an employment protection reform. We demonstrate that the notion of high-dimensional common trend confounding has implications for the economic interpretation of the policy evaluation results. Notably, measured reform effects are substantially decreased or even reversed when covariates are included in a data-driven manner.