Thank you for your question.
Unfortunately, the TRB145 does not have any built-in features to write Modbus data to flash memory.
Such functionality is currently in its early planning stage and currently planned with our RUTOS 7.4 release, but this milestone may change in the future.
That means you would need to write a custom script for this functionality to work, which is beyond the scope of our technical assistance or start additional development project. If any of these would be of any interest, I recommend contacting us directly here: https://teltonika-networks.com/about-us/contacts/
Please keep in mind that if the flash memory of the device fills up to its full capacity, the device might become unreachable.