Python 2, 8178 bytes
n=input() e=m=0 f=2 while~-n: if n%f:f+=1;e=0 else:e+=1;m=maxq=n%f<1;f+=1-q;e=q*-~e;m=max(m,e);n/=f=f**q print m -25 thanks to ovs.
This answer doesn't do prime checks. Instead, it takes advantage of the fact that the highest exponent of a prime factor will be greater than or equal to the exponent of any other factor in any factorization of a number.