Some Rules Things
I just wanted to clarify a couple rules item.
First, your perfect scenario involves two bonus action bonuses: Hexblade's Curse and the hex spell. You can certainly apply both of these by applying one outside of combat, but getting them both alongside the Gloom Stalker attack (which only applies on the first turn) can be difficult.
Remember that you only get one bonus action per turn, and that Dread Ambusher's extra damage only applies to the one attack extra that you get (emphasis mine):
If you take the Attack action on [your first turn of each combat], you can make one additional weapon attack as part of that action. If that attack hits, the target takes an extra 1d8 damage of the weapon's damage type.
Secondly, Eldritch Smite (unlike Divine Smite) requires specifically Warlock spell slots so multiclassing as a full caster won't give you more.
Now on to the optimization:
Advantage
The very first thing you should do is get a consistent source of advantage. This will help with the crit-fishing and sustained damage numbers. If you were hiding at the start of combat, only the first attack will have advantage, dramatically reducing the odds of a crit.
Right now (assuming you were hidden at the start of combat), you have a 52.2% chance to crit on the first round (assuming you used Action Surge), and a 19% chance to crit on later rounds.
If you instead get consistent advantage with your first action, these numbers change to 46.9% on the first round (giving up Action Surge attacks), but 34.4% on later rounds.
The best way to do this is to sacrifice hex (which was already hard to get because of the multiple bonus actions problem) in favor of shadow of moil which makes you an Unseen Attacker and therefore gives you advantage. This is accomplished with only two further levels of warlock and also improves your Eldritch Smite.
Since you are going to have advantage so often, get the Elven Accuracy feat for your free ASI. This will still get your Wisdom to 18 and improve your odds even more to 61.3% on the first round and 46.9% on later rounds.
Build So Far: Warlock (Hexblade) 7 / Ranger (Gloom Stalker) 4 / Fighter (Arcane Archer) 4
Now the builds diverge depending on whether you are interested in more crit-fishing bonuses, or sustained damage. I'll start with crit-fishing:
Too many crits, not enough smites
Since Eldritch Smite is only tied to warlock spells, the best way to get more smites (and more Shadow Arrows and Action Surges while you're at it) is to get access to the catnap spell. This will let you, once per day, use shadow of moil and one Eldritch Smite in two encounters before you need a full hour of rest.
The best option to get the spell help with our crits is Bard (College of Whispers) which gives just one more thing to add to our crits, Psychic Blades:
When you hit a creature with a weapon attack, you can expend one use of your Bardic Inspiration to deal an additional 2d6 psychic damage to that target.
You won't get catnap until level 20, but you will get Psychic Blades along the way as well as more spell slots to have fun options while you aren't smiting (these can be used with your warlock spells even if they can't be used to smite).
Final Build: Warlock (Hexblade) 7 / Ranger (Gloom Stalker) 4 / Fighter (Arcane Archer) 4 / Bard (College of Whispers) 5
I'm already napping
If your party already has an artificer, bard, sorcerer, or wizard who can cast catnap for your party, it is still good to grab Bard (College of Whispers) for three levels to add to your mountain of dice. However, those final two levels can be used elsewhere.
In this case, I'd recommend finalizing the build with two more levels of warlock to get your smite up to 5th level and gab the Crossbow Expert feat. This way, in combats with one major opponent that can soak up a lot of damage, you can use hold monster instead of shadow of moil.
Hold them with your Action Surge. Walk right up to the paralyzed foe with your Gloom Stalker speed. Get a guaranteed critical hit to dump your dice onto. This then let's all of your allies join into the crit-fishing game assuming they can fight within 5 feet of your target.
Final Build: Warlock (Hexblade) 9 / Ranger (Gloom Stalker) 4 / Fighter (Arcane Archer) 4 / Bard (College of Whispers) 3
Now for sustained damage:
Advantage always
If sustained damage is the name of the game, you really want advantage all the time to counteract Sharpshooter. This means your warlock spell slots are now for only shadow of moil. You then only have three first level smites from your ranger levels, but the advantage is more important than bigger smites for sustained damage.
Another important element is Concentration. While losing shadow of moil for a crit-fisher is somewhat okay once they've hit their big crits, it is not okay for sustained damage. I'd grab one more level in warlock to bump your Intelligence so you can multiclass into Artificer (which has a nice Infusion for Concentration).
First grab one more level of Warlock to get the ASI for 13 Intelligence; then take Artificer (Alchemist) for 4 levels. This gives you an alternative use of your low level spell slots than measley 2d8 smites. You can create Boldness Experimental Elixirs which function like the bless spell without the need for Concentration.
This also gives you access to Infusions like Enhanced Defense and Mind Sharpener to help with your Concentration until you get Resilient (Constitution) at level 20:
When the wearer fails a Constitution saving throw to maintain concentration on a spell, the wearer can use its reaction to expend 1 of the item's charges to succeed instead.
Final Build: Warlock (Hexblade) 8 / Ranger (Gloom Stalker) 4 / Fighter (Arcane Archer) 4 / Artificer (Alchemist) 4
Alternatively (and exclusively if your Intelligence is too low to reach 13 from one ASI), you could grab Resilient (Constitution) at level 16 and use your final 4 levels going even further into warlock.
This gets you an extra spell slot so that you have a further shadow of moil or a nice smite if you don't need three before a short rest. Additionally you can get access to a Mystic Arcanum (I recommend soul cage since your Charisma isn't that high for save DCs), some high level Invocations (including Lifedrinker when you hit 20th level), and a final ASI (probably to boost your Charisma for Lifedrinker).
Final Build: Warlock (Hexblade) 12 / Ranger (Gloom Stalker) 4 / Fighter (Arcane Archer) 4