Sounds interesting! I did see the first link. I was also thinking, since the camera integration can take a snapshot per layer, there must be a hook there. I was thinking it can run something completely outside of OctoPi. That might be a simple workaround. Then, life got busy.
Thanks for the info! I would love to see what you come up with in the end!