Once you duck off the straight-line between the Cape Cod and the mid coast of Maine, you add lots of time and miles. A good thing if you have the time, there's lots to see and sail.
Even going 6 knots, Onset to Isle of Shoals is a long day, but I've done it a couple times. Then Isle of Shoals to outer Penobscot Bay is another long day(less than the day before).
The 3 hypothetical legs you mention above; Onset-Cape Ann-Portland-Rockland, will all be nearly as long days, but will likely mean 3 to 4 days total, and you won't see a thing as you're spending your time going on and off the track.
I'd say if time is limited, do the Cape Cod Bay to Cape Ann area and save Maine for another time.
Or go straight through to Penobscot Bay if you have ample time to spend a week sailing in Maine. Then you're in an area where weather won't keep you in port. North-south-gale-, you can still sail the whole area, Rockland to MDI.