I got a 2015 335i (N55) CPO and the only problem so far has been the passenger side front camera would sometimes flicker. It was covered under warranty. That said it had pretty low miles when I got it, and still does (35k). If you can wrench yourself, you'll save a lot of money in maintenance, and the BMW community has an amazing amount of resources online.
One rule of thumb I've read is that if you can afford $2k maintenance per 10k miles, and also have a few grand for an emergency repair, you should be fine for at least the first 100k miles. IDK how accurate that is though. Just know that everything is likely more expensive than what you're used to. As an example, tires will be around $1k (even more if you want sportier ones, which have shorter life).
With all that said, it really is great to have a car that does so much, so well. I have zero regrets.