pf2e.fyi
From Pathfinder Core Rulebook, which isn't enabled.

Second Chance

HAZARD 21
Stealth +34 (legendary)
Description Powerful warding magic tied to an object or location tries to regress the ages of a creature and its allies.

Disable DC 46 Thievery (legendary) to take apart the spell one tiny piece at a time, with eyes closed, while recalling every vivid life memory in order, starting from the earliest memory

AC 10

In the Beginning (divine)
Trigger A creature tries to steal the object or intrude upon the location. If someone uses a proxy or dupe for the theft or intrusion, the trap unerringly targets the true perpetrator or perpetrators at any distance—even across planes.

Effect The triggering creature and up to five coconspirators instantly revert to infants, losing all memories, class abilities, and other skills acquired during their lives (DC 44 Fortitude negates). Reversing this effect is nearly impossible, requiring powerful magic such as Wish.
Pathfinder Core RulebookOGL