You stop them next fall by sealing the outside of the house before mid September and, where a house has a history of heavy invasions, having the sunny exterior walls treated by a licensed applicator in the last two weeks of September, before the beetles begin looking for a place to overwinter. Once they are inside the walls in November, the window for prevention has closed for the year.
Cornell's recommendation is to seal cracks and openings around windows, doors, siding, and utility pipes with a quality silicone or silicone-latex caulk, and University of New Hampshire Extension puts the deadline before mid September. Penn State's timing for any exterior work is late September or early October, just before the beetles congregate. Focus on the south and west walls first: the gap where the siding meets the window trim, the soffit and fascia line, the shutters, the dryer and bathroom vents, and the point where the AC line set enters the house. Replace torn screens and make sure the double-hungs close tight at the meeting rail.
On exterior treatment, we will give you the straight version. University of Illinois Extension notes perimeter sprays are often ineffective because the beetles are so mobile, and that is true if the spray goes on after they have started massing or goes on the wrong wall. Where it does help is on a house with a documented history, applied by a licensed applicator to the specific sunny walls and entry lines in the two weeks before the aggregation flight, paired with the sealing work. What we will not do is spray the inside of your house in November and call it a treatment. That is the one thing every source on this page agrees does not work.