Heavy quarks in polarised deep-inelastic scattering at the electron-ion collider