Breaking the curse of dimensionality in structured density estimation