Hi Przemek,
Welcome to the community!
Custom measures are deprecated, but I can’t give you a timeline on their removal right now. That doesn’t mean they won’t be removed, only that I can’t tell you when.
Given what you describe, your best bet is to create a custom plugin. I’m really not the best one to give you pointers on that, but there’s a whole category dedicated to the topic.
Ann