WASHINGTON — Democratic lawmakers accused Kevin K. McAleenan, the acting secretary of homeland security, of leading an agency with an “empathy deficit” during a hearing on Thursday that focused on the separation of migrant children from their parents and reports of poor conditions at holding facilities near the border.

“What does that mean when a child is sitting in their own feces? Can’t take a shower?” said Representative Elijah E. Cummings, Democrat of Maryland, the chairman of the House Oversight and Reform Committee. “What’s that about? None of us would have our children in that position. They are human beings.”

The hearing came a week after the committee released findings of an analysis of the more than 2,600 migrant children separated from their parents last year under the Trump administration’s “zero tolerance” policy, which has since been suspended. Democrats grilled Mr. McAleenan over the rollout of the policy, as well as over the discovery of a secret Facebook group for Border Patrol agents that included offensive messages, including obscene images of members of Congress.

“Did you see the images of officers circulating photoshopped images of my violent rape?” said Representative Alexandria Ocasio-Cortez, Democrat of New York. She also asked if the officers who had made the offensive posts in what she described as the “violent, racist group” on social media were still caring for migrants at the border.