Judges have no place deciding who can have an assisted death, the former head of the High Court’s family division has said.