knowing a lot of theory is good for solos because then you have more ink to write with. if you only know the pentatonic scales, sometimes you can be limited. but if you know other scales and patterns, then you will be able to use more colors. if you know something like a Phyrgian pattern than you could try using that instead of the same pentatonic scales you can't quite seem to use properly. so instead of struggling with one scale, try others.
BTW, nothing against people use the pentatonic scales because i do and so did Eddie Van Halen, and i remember that Zakk Wylde also does(and his stuff speaks for itself).
Thanks for listening to this small piece of me.