99.9% of the time, the most negative outcome of this kind of interaction will be losing my stuff, being arrested and held for anywhere up to 24 hours, or being denied entry. For most people, these are a compelling enough reasons to comply with a power-tripping border agent. Despite this ruling, your recourse in such a situation will remain quite limited.
Also, it's not exactly hard for a lawyer to argue that you were coerced into consenting to a search in your hypothetical example. Since the people crossing the border are mostly non-criminals if CPB does use those tactics routinely it will not take long at all for a suitably politically sympathetic victim to come along and precedent to be established saying that is also not ok.
I highly doubt they are getting a lot of convictions from illegal searches of devices. The overwhelming majority of convictions they get are from people physically smuggling drugs and weapons and apples across borders. They don't need to unlock your phone to catch you with any of these things. They already have the right to tear apart your car if they think you have drugs hidden in it.
It's a power play, not an actually useful LE tool. The overwhelming majority of the things that you may have on your phone that are going to get you in trouble with border control are not going to put you in jail. What they will do, is deny you entry, and possibly ban you for 5-10 years.
Since entry for non-citzens is a courtesy, you have zero redress in that case. You're never going to get your day in court, since you're not charged with a crime, and you will not be able to contest that the search was illegal.
The only way this ruling would result in any change, is if CBP voluntarily follows it.
So yes they can just send you back, it is in their capabilities and there's nothing the foreigner can do to counter that decision.
https://en.wikipedia.org/wiki/Carpenter_v._United_States#Sub...
You can win a Supreme Court case about a search being illegal, and still have that evidence be used to nail you on the original charge.
They can still do parallel construction, and can still cause you harm just by detaining you, and they can use your behavior in response to abuse as probable cause to justify further abuse.
If you were illegally searched, then law enforcement subsequently does parallel construction, defense counsel can easily and persuasively argue that the subsequent evidence is "fruit of the poisoned tree" and would not have occurred without the illegal search. The judge can then throw out all evidence from the parallel construction.
The only way parallel construction works is if defense counsel and the judge don't know that the illegal search ever happened at all - which is very unlikely in the case of an illegal border search.