“So being at a US boarding school does improve my chances if we exclude everything else?”
As others have said, you can’t exclude everything else.
Your grades are going to matter more than anything else. If you are somewhere that you can be happy and keep ahead in your classes, then you are more likely to do well.
If you do well wherever you are, then you improve your chances of getting into a good university.
You seem to have noticed that being at a “prestigious” high school does not make life wonderful. This will be true when you go to university also. You should find schools that are a good fit for you. I will admit that “which university is highest ranked” is relatively easy to find out, whereas “which university is a good fit for you” is much more difficult to figure out.