Bcm is different than Ecm. I am also just speaking from my Gm experience as I had really good relationship with the dealership I used. They knew my truck was modified and didn't deny anything warranty wise per say unless it was catastrophic failure. The service advisor and tech were very cool and upfront with me from the get go. They told me if it's something big i.e. engine/trans/fuel pump gm was requesting screen shots of the techs lab top to verify "flash" dates. Technically speaking there shouldn't be to much history unless it was for a recall or update. So let’s say you flashed your truck a month ago and a cp4 failed, you then un flashed the truck back to stock right before you took to the dealer they see the date and time. Why was the ecm flashed a day or hours before it went to the dealer? If it's a engine or transmission forget about it, they are sending someone out to that dealer to verify. Again this was Gm don't know what Ram is doing as I just got back into a Ram from 2012 lol.
I will say this, if you are going to flash a new truck you have to make a financial commitment. Dealers won't warranty stuff in most cases because they have to answer to the factory to get paid. The last Ram I had was modified decently, head studs/intake/downpipe full exhaust/injectors/tune. Anyhow, transmission started throwing some codes but still functioned. I knew it was on it's way out so before it left me stranded I bit the bullet and ordered a built transmission and installed it no dealer involved. I couldn't expect the factory to warranty that imo because it failed because of the power adders I put on it.
The new trucks are power monsters period. We strived back in the day to make a fraction of what these trucks make stock now. I am getting older so I am not as hungry to make power just more bored and like doing things to my vehicles but I like my warranty also so I am selective on my mods. Will a deleted and tuned truck make more power sure it will. Do emissions suck, sure does but sadly that's where we are heading. So unless you live in a state that's loose on emissions testing or doesn't have it at all it's something so consider. Again if warranty wasn't an issue, Calibrated tuning for me but I won't pay 4k for tuning, I did that on my last Duramax and now it's a fraction of the cost if I had waited a bit more. I currently have Banks intake and peddle monster installed an honestly that's more then enough. It didn't make more power per say but cleaned up the peddle lag I had and the truck is fine. I only ordered the edge because I liked that I could modify things without Alfaobd and I like the cts3 because it has a way bigger screen to monitor things.