CARACAS, Venezuela—When Ana, a five-year veteran of the national police, finishes her night shift patrolling this city’s dangerous slums, she often arrives home only to pick up her riot gear and head out again to confront rollicking protests against Venezuela’s embattled government.

On those front lines, she and her colleagues use tear gas and rubber bullets against increasingly desperate protesters armed with stones, Molotov cocktails and even bags of feces. The showdowns take place in scorching heat, and she says the authorities...