Never one way to write a solo. Most of my solo ideas originate from improv, though I try to make the solo echo melodies from the other sections of the composition as to help build a larger theme and find its place in this particular song. That way it’s not just noodling that, while it works musically, doesn’t always add to the piece outside of just having a solo for the sake of it.
Soloing is a great way to tell a story in your playing. If you think of the solo as a conflict chart from a story, you want to have the right exposition, rising action, climax, and resolution. What you do to accomplish those depends entirely on both the song and the player (things like increasing speed, having more vibrato and bends, changing position/scale/mode, etc, can all accomplish this), but having that type of crescendo outline helps me generally evoke more feel out of solo sections. Even in solos that don’t really increase very much in intensity/speed/etc, you can often still pinpoint those parts of the structure.
A good example of that would be the solo from ‘So Far Away’. The first part brings back a familiar sounding vocal melody from the song to fit it into the piece, then the tension rises as Syn moves higher up the neck, the climax is at the big bends right at the end before resolving the whole solo back at the route of the key. Even though he mostly follows Matt’s vocal melody, you still get that implied story crescendo.
Not saying at all that this is the way all soloists think through their playing, but I think a lot of players write solos with a similar structure even absentmindedly because it just works so well, and you’ll find this in a LOT of solos from all kinds of players.
Just a little something that helped me get on track to writing solos that felt both more structured as well as ‘in-place’ in the song!