The agency is ramping up arrests, but local pushback is complicating efforts to expand detention capacity and prevent overcrowding.