The purgeOldText.php script can be used to purge text no longer active on the text table. However, as the text_table description says, this table not only contains revision texts, but can potentially contain blobs from extensions. For example, I think AbuseFilter extension stores data there (abuse filter log details IIRC)
Looking at the code of purgeRedundantText it only looks for text referenced from the revision and archive tables (despite the horrendous query performed there). I’d say it’s not taking into account extensions, and this could potentially cause data loss.
Note that the purgeRedundantText method is in the Maintenance class, because it’s used by several maintenance scripts, which looks scary.