I believe you’re in uncharted territory here. I would assume transmission from a manual E60 5 series should bolt up, but I don’t know for sure. You will need to fab mounts, linkage, driveshaft, among other things.
Anything is possible with time and money

Keep us updated!