Maintain a public archive of your old tweets that's independent of X, as a self-hosted static HTML webpage.
This R/Quarto script reads your tweet archive (as downloaded from X), extracts the tweet texts and associated media (pictures, movies) and outputs them into a static webpage.
See https://wolfganghuber.github.io/tweets/ for an example.
License: LGPL (>= 3)