Protect Sketch from being Read

I was more wondering if some part of the process would leave the RWW flash write-locked. Like after a sketch has been loaded.

If not then I think it may be possible for a routine in bootloader flash to write records to application flash, a 3k data logger program on a 328p could have better than 24k storage around 10,000 times which ain't bad for a few bucks.

AMForth does write to flash while running which they say about why they use no bootloader:

this can only be changed for bootloaders with an application usable API to use the flash self programming feature. There are none currently available.

I'm just interested in writing data to flash ATM.

When I was reading on lock bits I see a note about running interrupts in SPM being lockable which leaves the question of running unlocked, can code in SPM be called or triggered to copy SRAM contents into a record in flash?