Having looked at this a little this morning, I would speculate that there may be cases where an account becomes protected, and then subsequently the user deletes the Tweet that had media content attached - but I can’t be sure that is what you’re encountering.
In general though, you should not be storing Twitter data (beyond Tweet IDs) longer term, so the cases where you’d end up going back and getting a 404 on a media URL should be pretty rare.
If the originating Tweet has become unavailable to your app for some reason - either due to deletion or protection - then you should not be surfacing the linked content, per the developer policy sections on maintaining integrity of Twitter’s products and respecting users’ privacy.