You will not be at any disadvantage for choosing a bad school over a good school, so long as your individual performance is the same in both schools. If you get a high ranking in an average cohort, then your scaled score will be the same as someone who got a middle ranking in a strong cohort. It's kind of like saying: someone who can win 2/10 football matches against Hawthorn is just as good as someone who can win 8/10 football matches against St Kilda
It doesn't matter how weak or strong your opponents (cohort) are, because the scaling evens it out in the end.
There is the psychological effect of going to a good school over a bad school, though. Many people find that they are more motivated when they hang around other motivated people, and hence their individual performance improves in a good school, giving them a higher ATAR. It can work the other way though: you could lose motivation if everyone around you is constantly scoring higher than you and making you feel stupid.
But if your individual performance is consistent, then you will get the same ATAR at any school you go to.