How to pre‑program factory reset on Android?

I hope you are all well.

I am seeking guidance on configuring a pre‑scheduled factory reset for a device running GrapheneOS. While I am aware of existing options such as a guest profile, duress PIN, and automatic reboot, these measures do not fully satisfy the requirements of my threat model.

Specifically, I would like to establish a mechanism that triggers a factory reset at a predetermined time—similar to the auto‑reboot functionality. Since GrapheneOS does not currently provide this capability natively, I am exploring whether a solution could be built using Tasker or a comparable automation tool.

If you have experience with implementing such a workflow, or can point me toward relevant resources or scripts, I would greatly appreciate your assistance.

Thank you for your time and support.