Literally had the same issue , bought a 335is from some hole in the wall and it went limp on the way home, took it back and got a m235i instead and then that needed a drive center support bearing luckily I bought warranty. And had that and a bunch of other things fixed. I also used to have a e46 m3 and that gave me nothing but codes that my mechanic couldn’t figure out so I just ended up selling cause the market is high wasn’t worth the headache for me !
The m235i was a good choice and more worth the headaches if you're going to have them. My E46 M3 had a ton of issues and would randomly stall at idle 😂 I sold as well before I got to the bottom of it. I do miss that car and regret selling it though