How to avoid group 5? Book a UA ticket, since UA only goes to 4 for boarding zones.
Windows in the back will be zone 2, though depending on the flight you may still end up boarding after half the passengers (as elites will board first, then pax in E+ / credit card holders / Premier Access pax will be zone 1). You can always buy Premier Access for the flight.