CARACAS, Venezuela—President Nicolás Maduro has lost support among the legions of poor Venezuelans that once backed the late Hugo Chávez, but they have largely shown little interest in joining the opposition-led protests that have convulsed the country the past three weeks.

Many of the impoverished residents of the vast slums that ring Caracas and other major cities are angry about a collapsing economy and food shortages. But Venezuela’s political unrest remains mostly confined to middle-class enclaves, underscoring the struggle...