The nice thing is that you will have addressed 95% of the common failure points on the M54 (others include cam pos sensors, oil level sensor, etc) and should set yourself quite a nice baseline for maintenance scheduling going forward. Also, all of the above will cost well under $1000.

bcbedliner is right. But keep in mind all that tear down and you may rebuild the top end intake. Don't change O2 unless you get code or other issue. Mine went 165K the first time around, second set still on at 241K. WHEN doing the intake manifold removal it's easier to get to all the vacuum lines and be sure to connect the small line going from the CCV to the oil pipe into the pan/block, this helps to improve vacuum pressure. If your doing all this front engine replacement, go ahead and do your Dvanos seals if they haven't been replaced. Good luck , have fun, these are easier and more roomy to work on than the E46 330 Ci.

There can be several causes of reduction in mileage not associated with 02 sensors. Pre cat sensors are part of establishing proper air/fuel mixture so can be the culprit if mileage is less but so can other issues such as a vacuum leak, MAF etc. That said, 02 sensors replacement guideline is around 80,000 miles.