a previous E36 325is with M50TU and E36 M3 with S50 owner here.
I would recommend to go with M52. Has so much fun usable torque. However, I would stay away from 1996 year. My friend used to be a tech at a local BMW dealership; they used to see quite few of them with issue. So 1997 to 1998 are good years to look into.