Thanks @schiffsratte , regarding mariadb/mysql charset, if you install recent FOP2 versions (from 2.31.50) using the standard install/upgrade method via curl/script
wget -O - https://download.fop2.com/install_fop2.sh | bash
wget -O - https://download.fop2.com/upgrade_fop2.sh | bash
It will download a special compiled version for latest/recent Debian versions, so the charset fix you mention (that is pretty clever) should not be needed.
I will see if I can verify the other PHP issues , as many of them were already handled in latest versions.