The issue has been solved upstream with motion 4.5 (probably 4.4
already). Since unstable still serves motion 4.3.2, I hope unstable and
then testing can be migrated to the latest motion release.
Bookworm first freeze starts in January, and it would be a pity to have
motion not included with next Debian release.
Since upstream developers provide own Debian packages, I can tell that
it worked well on Bookworm (with the upstream package for Bullseye),
until ffmpeg libraries got updated (dependency issue). If it helps to
get things forward, I can further test with compiling it on Bookworm
against latest ffmpeg libs on x86_64, arm64 and armhf.
Best regards,
Micha