I don’t know if this something you’re deliberately trying to avoid. Apologies if you are, and I’ve missed the point, but
I gave up on doing anything in TK years ago. For all the effort to make stuff work in it, you might as well just use flask and have a HTML frontend. That way, you know it’s going to work on everything and includes remote access as a bonus.
Edit: for a lot more power with a little bit more learning curve, look at fastapi.
Search for “Hexamethyldisiloxane adhesive remover”. It’s designed for removing ostomy bags but it will remove pretty much any gummy sticky glue from anything with very little effort.