Is this the sort of thing that Flatpak would be useful for? Or are there sandbox-related complications when using it to package a compiler?
I think the way the Linux ecosystem works is fundamentally against maintaining old binaries unless they are a text-only program.