PLANCHÓN, Peru—More than a decade ago, Leonardo Racua was one of the first people in Peru to agree to help preserve the Amazon rainforest in exchange for cash from the sale of carbon credits. He built a thatched-roof home in the country’s southern Madre de Dios state and harvested Brazil nuts that …