The courts do have the power to declare him ineligible. If he's ineligible, no one need obey his orders. No military, no civilian. He might himself put out on the street by the Secret Service. If he wasn't President, he couldn't even qualify for a clearance as White House gardener
Where did you get this idea? You can remove a President in one of four ways: death (Lincoln, Kennedy, etc),resignation (Nixon), impeachment (None - Johnson and Clinton tried but found not guilty), and defeat in an election (G.H.W. Bush, Carter, others). Absent removal by one of these legal/natural means, the President remains in Office and retains all the powers of that Office. What court do you think has the power that you suggest?