Power is the ability to get people to obey of their own volition. In liberal democracies, executive officials are obeyed because their underlings believe that the only legitimate course of action is to obey them. In the background, there is the fear that disobedience will have negative institutionalized consequences. That is, the civil service or judicial branch will cause you to lose your job or your freedom because you disobeyed a legal order.
There are countries in which presidential orders might be viewed as presidential suggestions. There is a head of government, but there is no internalized pressure to obey. Those presidencies are weak.
But the same logic applies to the judiciary in strong liberal democracies with strong executive branches.
Courts do have real power over the executive branch, as long as executive officials believe that court orders are legitimate things that need to be obeyed over other orders because it is the right thing to do. In fact, courts have real power as long as executive officials believe that other executive officials believe that they need to be obeyed over other orders because it is the right thing to do. After all, you might not believe that the court order is legitimate, but if other officials do then your particular ass is grass when those officials enforce the subsequent contempt order.
In other words, Andrew Jackson might have been right in his time and place, but he was not expressing a general principle.
We are seeing that stress-tested. I worry that these stories of USCIS officials denying court orders are getting insufficient play. If officials do not obey court orders over other orders because that is what the Constitution says that they should do, then America is in for a world of trouble.