@Nemanja Jovic Thanks for reaching out. You can use a PATCH API call to renew the Microsoft Graph Webhooks subscription (it doesn’t matter what the endpoint event handler).
Update subscription - Microsoft Graph v1.0 | Microsoft Learn
You would need to have a scheduler to run the program calling the PATCH API periodically to achieve the automatic renewal.
let me know incase of further queries, I would be happy to assist you.