PIC 16F887 unable to store UART data in buffer
I'm not sure why it stops sending data to the ESP8266, but I can see two errors in your code:-

if(OERR){
    OERR = 0;
    OERR = 1;
} 


OERR (receive overrun error flag) is read-only. If for some reason the UART receive buffer overruns it will stop receiving characters. To clear the overrun error you should clear and set CREN (Continuous Receive Enable).

PIR1bits.RCIF = 0; // clear rx flag


RCIF is read-only. It is automatically cleared when all characters in the UART receive buffer have been read.