Rear camera still quits after replacement.

My iPhone 8 rear camera quit (vertical lines, then black screen. I replaced the camera, and it worked for a few days, then quit. I took out the replacement and reinstalled it, and it worked again for a few days, the quit. The phone has not been damaged; it is in an otterBox case and otherwise works fine. Any suggestions as to what’s affecting the rear camera? The usual reset steps have no effect. Front camera works, but sometimes takes a while to come on or gives a frozen image.

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0
crwdns2934285:0crwdne2934285:0