Owners of McDonald’s franchises in the UK have been told they could face legal action if they fail to take steps to protect workers from sexual abuse.