I would like to know if it's possible to use Node-Red instead of MPLAB X IDE to utilize the PICkit 4 programmer/debugger to program my device.
I've been looking for information regarding this topic but couldn't find anything so far, probably because I'm missing the right keywords.
Any help is very much appreciated.
I would consider it highly unlikely to be able to use Node-Red to talk to a PICkit 4. With MPLAB X being free, designed for Microchip microcontrollers, and designed to talk to the PICkit 4, why would you consider Node-Red?
The consideration of using Node-Red is to create an interface where people with lesser technical knowledge of programming can use PICkit 4 to program microcontrollers without having the need to use & understand MPLAB X.
Would Node-red generally be able to act as an interface to program microcontrollers using a different debugger/programmer such as JTAG?
Node-Red has no native understanding of microcontrollers. For example, microcontrollers have special function registers to configure various system, GPIO, and peripheral functions. MPLAB X takes this into account, and the MPLAB Code Configurator (a nice graphical interface) will write the configuration code for you.
For those wanting to start with embedded microcontrollers, the Arduino has an immense following with tons of example code out there.
There is also ChatGPT. I posed a question to it regarding implementing a simple solution involving a button and LED on a particular Microchip part (12F752) in C. The response included the appropriate special function registers, timing, and flow control. Very nice, and it even explains why it did what it did. Copy and paste that into MPLAB X and you have a big head start.
ChatGPT will accept the JSON from an exported Node-Red flow and analyze it for you. You might be able to have it write C code from it, but I have not tried that, and it certainly wouldn't understand the bare metal configuration required for a microcontroller.
Getting Node-Red to try to do what you are asking would seem to be a big headache.