Sounds like a crap deal all round, inc towards your warranty company. $12k for the work, and/or additional $4k out of pocket for a new engine?
Just put in a new long block with a core swap. If I'm not mistaken on p/n. A new full long block is around $4k for a new unit.
https://www.realoem.com/bmw/enUS/sho...diagId=11_4162