score:3
You can make this connection, but I would recommend that you leave extra time to check-in with the airline when departing Peru.
You've linked to the official UK government web site, which explains that you don't need a visa to transit landside if: "you have a common format residence permit issued by an European Economic Area (EEA) country or Switzerland".
The common format residence permit is easy to recognize: It looks like the following sample, regardless of country or language. Note the color scheme and the bull and groups of three and two stars in the upper left corner. If your card (or the sticker in your passport, for older permits) looks like this, then you are OK.
I suggest that you leave some extra check-in time when departing Peru, because the rules for transiting the UK are complex, and it may take some time for the airline agent to verify that you do indeed qualify for this exemption.
In particular, they will check Timatic, which explains the landside exemption, but this itinerary gives a much longer result than most, and it will take some time to parse it. You may wish to bring a copy with you. The relevant bits for you are:
Visa required, except for Passengers holding confirmed onward tickets passing through United Kingdom immigration to make a landside transit to a third country on a flight that departs before 23:59 the next day. The following conditions must be complied with:
- passenger must arrive and depart by air; and
- passenger must have no purpose in entering the United Kingdom other than to pass through in transit; and
- passenger must hold all documents required for the next destination; and
- passenger must pass through United Kingdom Immigration; and
- passenger travels with a document listed in the following warning(s):
- Warning Passengers may make a landside transit if holding a valid, common format residence permit issued by an EEA Member State or Switzerland. (SEE NOTE 57399)
Going outbound, airline agents in Amsterdam ought to be very familiar with this exception, so it should cause you no issues or delays checking in.