Former President Donald Trump has frequently cited presidential immunity in his efforts to thwart criminal and civil cases against him.