C (gcc), 158158 153 bytes
-5 bytes thanks to ceilingcat.
i,l,s;p(c,s){printf("%*c%*.*s%c\n",i*2+1i-~i,c,l,l,s,c);}f(n){s=memset(malloc(5*n),45,5*n);for;l=1;for(i=n;i--;p('|',""))l=(n-i)*4+1l+=4,n-1^in+~i?p(43,s):p(32,"_|_|_");p(43,s);}