Failed upgrade to Buster from Strecth

Yes, please do this steps for cleanup:

apt autopurge 'php7.2-*' 'php8.0-*' 'php8.1-*'
apt-mark auto libpcre3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libsodium23 libxml2 libxml2-dev libzip4 php php-common php7.3-redis php7.3-sqlite3 php7.3-intl php7.3-igbinary php7.3-apcu php-igbinary php-redis
apt autopurge
dpkg -l | grep -E 'debian9|bpo9'

The last command is to get a list of still present Stretch packages.