I have an att m8, currently rooted and with unlocked boot loader. I just read some guides on how to remove tampered flag, remove red development text, and change unlocked banner to show locked again.
My question is, would these be enough to not raise any alarms if something happened to the phone and needed to be sent in for repair?
visually,yes. for all practical purposes the phone will look 100% stock.
however,if you s-off'ed with a method that required you to htcdev unlock,then htc does have record of your imie,esn,etc as well as all your htcdev account info. no matter how completely you return to stock(including going s on

) htc technically knows that you have messed with it,and
could reject any claim they feel is the result of such tampering.
for what its worth,ive not heard of htc denying any legitimate hardware claims,and have heard countless stories of folks turning handsets in to carriers unlocked,rooted,and even running custom roms.
if i had send any device for a legitimate warranty claim,steps i would take:
-restore mid and cid if altered
-remove
tampered banner
-
lock bootloader
-run an ruu
i would not turn s on. but if you chose to,make sure your device is able to be htcdev unlocked(i.e. not verizon) and when you run an ruu,run an old one that is s-off'able
hope that helps