that sounds pretty related to Kolgomorov complexity, which is uncomputable in general. https://en.wikipedia.org/wiki/Kolmogorov_complexity
I too would be interested in approximations or heuristics if anyone has any