The big question here is will you be allowed to transit in Lima without claiming your bags and going through customs? I don't know the answer to that, but if you do have to claim you bags then no worries you can just re-check them with Taca.
Regardless, when you check in for your flight at DEN bring a printed copy of your Taca itinerary so the UA agent can tag the bags through to your Taca flight. It shouldn't be a problem.