Hooks or events for block creation

Hey Kirby Forum,

a customer wants to track all buttons on their website. These buttons are usually inside blocks. Some blocks have multiple buttons. This means I need some type of persistent identifier for each button. My idea was to generate and save an UUID on block creation that clearly defines a specific included button.

Is there a native way to hook into block creation or updates? Of course I could do some heavy computing in the page.update hook but since my blocks are deeply nested into layouts traversing them to find new or updated blocks seems too resource hungry and not like a clean way of doing this. Is there some native ideally performant way to do this without slowing down the panel too much?