Labour’s struggles in the wake of the independence referendum may have stood them in good stead for the future, the former head of the Better Together campaign has said.