As noted before, work on your timing, as a bassist, its critical to have a solid sense of time.
My process when I want to write something really intricate is to start extremely simple. Once you have a core rhythm, and your hand is comfortable playing that riff, push it a little further on the next refrain. Add a couple notes in, if they don't sound right, its ok as long as they're on time, just continue playing (gotta practice keeping time, even if you mess up.),and just fix it the next go around.
Experiment with hammer-ons and quick slides, they can make your playing sound much more intricate without the drawback of killing your hands once they get used to it.
As far as writing goes, its really all up to your level of skill and determination. Find a song that you know will challenge you, and try to see what that bassist was doing in his or her fills/rhythms, you'd be surprised how simple some extremely intricate sounding bass lines really are once you break them down.
As for your ability to play better... Exercise. The best way I've found to do that, is to play! If you're practicing and exploring new sounds or ways of playing, you will naturally get better.
When I want to push myself to improve, I try to speed up songs until I'm not fretting properly anymore, then I back off a little bit at a time till I play it, after four years you should have some skills behind you at this point, try to change your fretting to make it more percussive to save having to pluck or pick the string one or more times(allowing for more notes in a shorter amount of time).
If it sounds too harsh, try slowing down the speed of the hammer-on slightly until its smoothed out, and once you do that, try to lower where your fingers rest while playing until your fingers are moving as little as possible to fret or move to another fret.
Once this becomes muscle memory your hands will use less energy to play more notes than you are now. I seem to recall really starting to fine tune my playing around my 4th year and this is one of the things I wish I'd known then. Good Luck.