Might have gotten more publicity as it was used in Star Trek: Strange New Worlds as a Starfleet motto. Boimler in Lower Decks also has a poster with the motto on it.
For the record, Deus ex Machina is more a specific literary device- literally a crane lowering a god to save the protagonist in Roman and Greek dramas.
To be fair they were more interested in telling a moral than being a good story. But the whole hanging-actor thing was meant to say they were a god and could just wave problems away. (Apparently literally.)
More literally, memento mori is "remember you will die". There was a Roman ceremony called the Triumph when a successful war commander would parade on a chariot through Rome.
Allegedly, someone would follow them through the day telling them "memento mori" to... keep them humble, I guess? as they were basically showing off to everyone in a god costume.