Hi @alicetin ,
I'm using the same (well, similar) approach with the McuLib which includes basically many of the former Processor Expert component functionality, but now ported to the MCUXpresso SDK.
You might have a read at:
https://mcuoneclipse.com/2021/12/19/key-value-pairs-in-flash-memory-file-system-less-minini/
I'm using it with an LPC55S16 here too:
https://mcuoneclipse.com/2021/12/30/lorawan-with-nxp-lpc55s16-and-arm-cortex-m33/
The key part is in the McuFlash.c

It supports 'Kinetis', but I have used it only with the K22 and K02 family, and I don't have any KV one. So I assume you would have to implement the basic flash programming in McuFlash.c/h/config, but this should not be difficult (I hope).
I hope this helps,
Erich