Reduced modelling and optimal control of epidemiological individual‐based models with contact heterogeneity