This is the same way I worked out the same tune at first. It does make for a good exercise.
Later you can try alternating the up & down patterns on every 2 chords or each chord change if you want to take it further. It’s a toughy at first, but a good dexterity exercise.
Side note: the A part, done this way, is made up of what i call “circular licks” ()there is a real name for them, but can’t recall it) where you return to the beginning note. They are a very useful tool to as a concept to keep in mind when creating.