I Do Not Recommend Dipping Assassin
The three levels of Rogue will mean you lose the fourth attack from Fighter 20. We'll ignore the actual crossbow in use, because we can compare the average damage of two Sneak Attack dice (7) to the damage bonus from Sharpshooter (10, and you are taking Sharpshooter, right?). Combine that with that Extra Attack also including the base damage for the weapon and your attribute, and a few dice of Sneak Attack keep getting smaller and less relevant.
By taking those Rogue levels, you also lose out on the L18 fighter Feature (in the case of Battlemaster, that's d12s for your Superiority Dice) and the L19 ASI.
What do they get you? Not much. We've already determined Sneak Attack itself is not worth it (and we didn't even consider all the conditions that need to be in place to get a Sneak Attack in the first place). Assassinate seems good on paper, but is pretty weak in practice, especially what appears to be the bigger benefit. The problem comes that Surprise is difficult to arrange on a regular basis - it's not something you can force.
I Do Not Recommend Assassin At All
Honestly... I can't make a general recommendation for Assassin at all. Unless you know your DM is going to reliably and regularly set up the conditions for it's abilities to work (Infiltration Expertise and Imposter are highly DM-dependent, too), it simply isn't worth the investment.