I would say that you might want to know more detailed information about each of the components you want to swap, even the blocks. Some stuff to consider...
bore of each
displacement of each motor
I looked at the BMW TIS and what I see is that piston diameters vary to start. In the M50 the piston diameter has three sizes: 83.980, 84.230 and 84.480 mm and that is on the B25 version, the B20 is much smaller
The S52 has a much larger size: 86.365 and a 86.565 mm
I can tell you what specs each motor has if you are serious
A lot of variables... seek professional help or possibly waste money, that is my opinion
One of your starting points is to find out if the blocks are the same, that may answer more of your questions