There are a number of ways you could implement this but for this particular use-case I would suggest using Harlowe or SugarCube's History system.
note: the following will assume that the three non-true ending related Passages are named:
"Ending 1", "Ending 2", and "Ending 3"
1. For Harlowe 2.x you would use a combination of the (history:) macro and the Array contains operator
If you visit the each of the following three Endings in any order then a fourth option will appear.
[[Visit Ending 1->Ending 1]]
[[Visit Ending 2->Ending 2]]
[[Visit Ending 3->Ending 3]]
{
(set: _list to (history:))
(if: _list contains "Ending 1" and _list contains "Ending 2" and _list contains "Ending 3")[
[[Visit True Ending->True Ending]]
]
}
2. For SugarCube 2.x you would use the hasVisited() function like so.
If you visit the each of the following three Endings in any order then a fourth option will appear.
[[Visit Ending 1->Ending 1]]
[[Visit Ending 2->Ending 2]]
[[Visit Ending 3->Ending 3]]
<<if hasVisited("Ending 1", "Ending 2", "Ending 3")>>
[[Visit True Ending->True Ending]]
<</if>>