Personally, I think if you start having too many "ifs", the situation gets a little complicated. There are a lot of moving parts and in the end if the TA check-in agent decides you're not "transiting" be it because of the length of the layover, need to check baggage, etc, you can be denied boarding on your LIM-GRU flight.
You either take a non-negligible risk, or go through the pain (and cost) of taking a Brazilian tourist visa. On the positive side, it's valid for 10 years, so who knows if it might come in handy again during that time?