Writing data on EEPROM or Flash memory of the PIC18F47J53
The PIC18F47J53 doesn't have EEPROM memory.

As for Flash programming, I don't believe there's a simpler way to write to it than the one you tried. You just have to be careful not to write/erase an already used memory section.