Try playing those runs in a loop, just playing it over and over and over and over and over and over and over and over and over and over and over.
I had a run like that in a Sublime song, that I couldn’t quite ever get right when playing along with the song. I played it slow, at speed and faster over and over thousands of times, sometimes for like 3-5 minutes at a time.
Now, I can play that part without hardly any thought at all.
Same goes for the main slap riff of Take the Power Back by Rage Against the Machine. I have just played it over and over so many times that I play it without thinking. I only need to think every 4 bars when there is a different ending, but I played it thousands of times for 3-5 minutes a time many times a day, many days a month.
You can do it, and going slow and speeding up, ramping up, playing it faster, all that is great, but you still need to play it enough that it becomes engrained in your brain and muscle memory so you could almost play it while singing or talking to somebody or reading something on a computer screen.
I do that for a lot of songs that I learn, especially when it is a song I really like. sometimes the only thing I do on a bass in a day is play a section of a song I like and want to be able to cover.
I can jam parts of Black Sabbath Iron Man all day long and not get bored.
Not the main, immediatly recognizable riff, but the jamming parts of the song, it kicks ass, and it has sort of a bass solo during the sections, so I have a lot of fun with that. I still can’t play that one without thinking about it, I have a few thousand more times to go to get it fully memorized.