If you're not trying to arrow build, scouts should always be #1 with the boston basher. If you happened to ever get bombed by a soldier, or someone runs at you, the scout immediately has the ability to shoot back at them. If you're using the Escape Plan, the soldier still has to deal with minicrits for a few seconds while he just put his escape plan away. Always remember that you scouts don't have to be super low to be building ubercharge with you.
Even if a pocket is running shotgun I wouldn't risk building with him because him consistently holding down a choke with 4 rockets is more valuable than 3 rockets. The 'optimal' way to be building with your pocket is if you want to tank him while he risks getting shot at multiple times. At the same time, he does put himself at the risk of dying and randomly being attacked by a sniper. Boston Basher building with scouts is much better because they control the amount of damage they're taking and they don't risk any random factors (like snipers).
If you are trying to Arrow Build, don't do it on a scout. In order for Arrow Building to be as overpowered as it is, you want to be constantly trying to hit your limit. The most amount of percentage you can get from an arrow is around ~10% (I was certain it's 9 but I'm probably wrong), and in order to receive that amount from arrows you have to do +150 Health back. Scouts have a max of 125 HP, and when arrow building with them, they can't risk going to absolute 1 or 0 health. So you only arrow scout for like 100 health at most, usually.
The most effective way my team found for arrow building is shooting arrows at a Demoman harming himself with a zatoichi from as far as you can. The Zatoichi does -50 health when you draw it back, so the demoman from full health can easily do -150 to himself. He can also still keep up his sticky traps.
Soldier running shotgun is probably the most optimal for arrow building, because he can be considered a throw away class as there are two of them. So if you happen to be rushed and the person arrow building dies, it wouldn't guarantee a point loss. If you're soldier isn't comfortable running around with a shotgun though, Demoman + Zatoichi method is much more consistent and doesn't risk someone playing out of their comfort zone of playstyle.