Before covid, I would be sick with a cold or flu for a total of about two weeks every year. That means I spent 4% of my time sick; one out of every 25 days. Since covid appeared, I've been wearing an N95 in crowded indoor areas whenever I reasonably can. (Obviously I can't if I'm eating something.) My main goal initially was to protect my elderly relatives, but during the last four years I have not gotten sick even once, except from my elderly relatives who didn't wear masks, got sick, and then infected me when I was caring for them.
Why isn't everyone wearing N95s? Sure, it's uncomfortable, but being sick is much more uncomfortable. And then there's the fact that wearing an N95 protects other people and not just the wearer...
I think that would be beyond the authority of the court, although exactly where the court's authority ends is unclear. It doesn't get to dictate foreign policy, so I expect that it can order the executive branch to do things consistent with the current foreign policy towards El Salvador (like asking for him back) but it cannot order the executive branch to dramatically change that foreign policy (by imposing tariffs).
The problem I foresee is that Trump can make an official request but also say that he would be happier if the request was not granted. (Something along the lines of "Please return this horrible criminal, who I never want to have in America again, because the court is ordering me to ask you against my will, and keep in mind that if you say no then I won't force you to do anything and in fact I'll like you better," which I don't think is much of an exaggeration given Trump's lack of subtlety.) If El Salvador then does not grant the request, I'm not sure what the court could do.