A conceptual problem with ESG as a factor is that ESG criteria seem to me about preferences over how firms operate rather than preferences over when cashflows occur? I don't think this is a strong reason not to go down the road of investigating ESG as a factor, but you'll want to think about how you frame your research question and how you discuss whatever your results mean.
Is ESG about firm characteristics (rather than covariance with macroeconomic risk factors)?
Imagine two firms A and B with perfectly identical cash flows to investors. Let's imagine Firm A scores high on ESG criteria while Firm B scores low. Would the market value of Firm A be higher (and expected returns lower)? All else equal, does the market have some preference for high ESG firms? If so, that's a violation of the law of one price, and what's being valued are firm characteristics, not cashflow characteristics.
Let $X(\omega)$ be a random variable denoting some stochastic cashflow, that is, $X(\omega)$ is a function that gives the cashflow of a firm in different states of the world $\omega \in \Omega$. In traditional asset pricing theory, the only things that matter for valuing $X$ are (1) the cashflows $X(\omega)$ and (2) state price for each $\omega \in \Omega$. The motivating theory behind factor models is that those state prices lie in the linear span of the factors. In typical macro-finance models, the factors are thought to be proxies for the marginal utility of consumption (whether that's correct or not is another issue).
Carhart and the example of momentum
Since Jegadeesh Titman famous paper in the early 90s, there's been discussion and research on momentum as explaining variation in the cross-section of expected returns. Fama and French have declined though to add momentum to their factor models because they can't see it as a risk factor.
How could Carhart justify adding momentum to the Fama-French 3 factor model (to create the Carhart 4 factor model)? One thing Carhart did was emphasize his model as a tool for performance evaluation. If a mutual fund has earned higher average returns by simply loading up on momentum, that's a useful fact to know. He deftly sidestepped the issue.