Would learning a somewhat hard solo over a long time, say 1 month, improve some techinques or would i still need exercises and/or a teacher? I mean if you can master a solo with fast picking then your alternate picking techinque will improve, for example, or a solo with a lot of bends would help with that skill.
Well, anytime you learn something new and get better at something, you're going to improve in some way. So I would say a simple answer to your question is "yes." However, when you try to teach yourself more advanced stuff like that, you always run the risk of developing bad habits and techniques and stuff. And I say this as someone who has probably picked up many bad habits from teaching myself how to play over the past ten years or so. (It took me like 3 years before I started using a pick for chrissake...) So just be prepared to figure out how to play something only to find out a while later that there's a better way to do it, or something like that. Just my experience anyway. That's obviously no reason not to learn a sweet solo or more advanced song though! I mean, as long as you keep having fun, you'll keep playing, and you'll keep getting better.
I say it only will if your techniques is pretty much in the right place any way. Like for example, good picking hand position, good picking motion, getting all the down and upstrokes right etc.

If your technique is in a good place then it should work. It should help to bring it up a level, bring in some new elements etc.

If its not in a good place you will just be practicing bad technique, getting it embedded into your brain and muscle memory and gaining bad habbits.

I personally think its good to ease your way up harder songs but learning songs that gradually get more advanced.
In my mind, the best way to improve is to overreach and try to learn something that's too hard to play easily, then practicing it until you get better. I learned to sweep by starting to learn Jason Becker's Altitudes six months in. I learned to tap from Metallica's One and from Protest the Hero's Bloodmeat. I learned alternate picking by going full bore and picking the craziest, hardest stuff I could find and practicing it until I made that song my bitch.