Understanding the impact of social factors on the transmission dynamics of infectious diseases across highly heterogeneous risk environments