Python 3, 48 bytes
f=lambda n:n>1and-max~min(~i-fi+f(n/i)for i in b"")
50 bytes
f=lambda n:n>1and min(i+1+f(n/i)for i in[2,3,4,5])
Doesn't bother with the formula. Instead, implements the characterization from the math SE post where each step creates 2, 3, 4, or 5 copies of the strings for that many operations plus one.
The outputs don't match the formula-derived test cases on powers of 4, but as Bubbler points out, this is due to a typo in the formula in the math SE post.