Debugging PIC16F886 with PICkit4
There are a few things that may be the cause of instability in your PICkit4.
The code you posted could be a lot better so here is a custom crafted PIC16F886 assembly language example for you:
    ;
    ; File:     main.S
    ; Target:   PIC16f886
    ; Author:   dan1138
    ; Date:     2020-09-29
    ; Compiler: pic-as(v2.20)
    ; IDE:      MPLABX v5.40
    ;  
    ;                            PIC16F886  
    ;                     +---------:_:---------+
    ;          VPP RE3 -&gt; :  1 MCLRn     PGD 28 : &lt;&gt; RB7 PGD
    ;              RA0 &lt;&gt; :  2 AN0       PGC 27 : &lt;&gt; RB6 PGC
    ;              RA1 &lt;&gt; :  3 AN1      AN13 26 : &lt;&gt; RB5
    ;              RA2 &lt;&gt; :  4 AN2      AN11 25 : &lt;&gt; RB4
    ;              RA3 &lt;&gt; :  5 AN3   AN9/PGM 24 : &lt;&gt; RB3
    ;              RA4 &lt;&gt; :  6 T0CKI     AN8 23 : &lt;&gt; RB2
    ;              RA5 &lt;&gt; :  7 AN4      AN10 22 : &lt;&gt; RB1
    ;              GND -&gt; :  8 VSS      AN12 21 : &lt;&gt; RB0
    ;              RA7 &lt;&gt; :  9 OSC1      VDD 20 : &lt;- 5v0
    ;              RA6 &lt;&gt; : 10 OSC2      VSS 19 : &lt;- GND
    ;              RC0 &lt;&gt; : 11 SOSCO      RX 18 : &lt;&gt; RC7  
    ;              RC1 &lt;&gt; : 12 SOSCI      TX 17 : &lt;&gt; RC6  
    ;              RC2 &lt;&gt; : 13 CCP1      SDO 16 : &lt;&gt; RC5  
    ;              RC3 &lt;&gt; : 14 SCL       SDI 15 : &lt;&gt; RC4  
    ;                     +---------------------+
    ;                             DIP-28
    ; Description:
    ;
    ;   Example project for the PIC16F886 controller using the pic-as(v2.20) tool chain.
    ;
    ; Add this line in the project properties box, pic-as Global Options -&gt; Additional options: 
    ;   -Wa,-a -Wl,-pPor_Vec=0h,-pIsr_Vec=4h

        PROCESSOR   16F886
        PAGEWIDTH   132
        RADIX       DEC

    #include &lt;xc.inc&gt;

    ; PIC16F887 Configuration Bit Settings

    ; 'C' source line config statements

    ; CONFIG1
     config FOSC = INTRC_NOCLKOUT; Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN)
     config WDTE = OFF       ; Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register)
     config PWRTE = OFF      ; Power-up Timer Enable bit (PWRT disabled)
     config MCLRE = ON       ; RE3/MCLR pin function select bit (RE3/MCLR pin function is MCLR)
     config CP = OFF         ; Code Protection bit (Program memory code protection is disabled)
     config CPD = OFF        ; Data Code Protection bit (Data memory code protection is disabled)
     config BOREN = OFF      ; Brown Out Reset Selection bits (BOR disabled)
     config IESO = ON        ; Internal External Switchover bit (Internal/External Switchover mode is enabled)
     config FCMEN = OFF      ; Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is disabled)
     config LVP = OFF        ; Low Voltage Programming Enable bit (RB3 pin has digital I/O, HV on MCLR must be used for programming)

    ; CONFIG2
     config BOR4V = BOR40V   ; Brown-out Reset Selection bit (Brown-out Reset set to 4.0V)
     config WRT = OFF        ; Flash Program Memory Self Write Enable bits (Write protection off)

    ;
    ; Power-On-Reset entry point
    ;
        PSECT   Por_Vec,global,class=CODE,delta=2
        global  resetVec
    resetVec:
        PAGESEL main                ;jump to the main routine
        goto    main

    ;
    ;   Data space use by interrupt handler to save context
        PSECT   Isr_Data,global,class=RAM,space=1,delta=1,noexec
    ;
        GLOBAL  WREG_save,STATUS_save
    ;
    WREG_save:      DS  1
    STATUS_save:    DS  1
    PCLATH_save:    DS  1
    ;
    ;   Interrupt vector and handler
        PSECT   Isr_Vec,global,class=CODE,delta=2
        GLOBAL  IsrVec
    ;
    IsrVec:
        movwf   WREG_save
        swapf   STATUS,W
        movwf   STATUS_save
        movf    PCLATH,W
        movwf   PCLATH_save
    ;
    IsrHandler:
    ;
    IsrExit:
        movf    PCLATH_save,W
        movwf   PCLATH
        swapf   STATUS_save,W
        movwf   STATUS
        swapf   WREG_save,F
        swapf   WREG_save,F
        retfie                      ; Return from interrupt
    ;
    ; Main application
    ;
        PSECT   MainCode,global,class=CODE,delta=2
    main:
        clrf    INTCON              ; disable all interrupts
        banksel PIE1
        clrf    BANKMASK(PIE1)
        clrf    BANKMASK(PIE2)
        banksel OSCCON              ; Select INTOSC at 8MHz
        movlw   0x70
        movwf   BANKMASK(OSCCON)
        banksel ANSEL               ; Make all GPIO us digital mode
        clrf    BANKMASK(ANSEL)
        clrf    BANKMASK(ANSELH)
        banksel PORTA               ; Make all output zero
        clrf    BANKMASK(PORTA)
        clrf    BANKMASK(PORTB)
        clrf    BANKMASK(PORTC)
        banksel TRISA               ; Select input and output GPIOs
        clrf    BANKMASK(TRISA)     ; Make RA0-RA7 outputs
        movlw   0x01
        movwf   BANKMASK(TRISB)     ; Make RB0 an input, RB1-RB7 outputs
        clrf    BANKMASK(TRISC)     ; Make all PORTC outputs
        banksel OPTION_REG
        movlw   0xDF
        movwf   BANKMASK(OPTION_REG) ; Set TIMER0 clock source to FOSC/4, prescale 1:1, WDT prescale 1:128
    ;
    ;
    ;
        banksel WDTCON              ; Enable WDT timeout
        bsf     BANKMASK(WDTCON),WDTCON_SWDTEN_POSITION
    loop:
        banksel PORTA
        movlw   0x01
        xorwf   PORTA,F
        sleep               ; typical sleep time 2.048 seconds
        nop
        pagesel loop
        goto    loop
    ;
    ; Tell linker the power on reset entry point
    ;
        END     resetVec

Another thing that may help or brick your PICkit4 is to use the MPLABX Integrated-Programming-Environment(IPE) tool to do a &quot;Hardware Tool Emergency Boot Firmware Recovery&quot;.

This is a tricky process that may require a few tries before you do it correctly. You will need to unplug and plug in the PICkit4 at the proper steps in the process.
The worst case for you is that your MPLABX v5.40 installation is somehow corrupt. This will require you to uninstall it, be sure that any remnants of previous MPLABX installs have been deleted, the install it all again. After doing the only 10 or 15 times it becomes only monstrously annoying.