Modelling kilonova afterglows: Effects of the thermal electron population and interaction with GRB outflows