If you want your engine to be covered by the warranty, leave it stock until it runs out
. ECU (DME) flashes are irreversible, and will always be detected. And no, you'd NEVER win a lawsuit in court against BMW for tampering with the DME, so just understand the risk
. Good luck.