It's an edge case, but it's RAW, and it only requires a focus on the rules rather than common sense.
Nothing requires you take a long rest, except common sense. As a lock you regain spell slots from a short rest. As a sorcerer you can convert spell slots into sorcery points and create spell slots from sorcery points. Your sorcery points and sorcerer spell slots reset after a long rest. So you convert your spell points into sorcerer spell slots, convert your warlock spell slots into sorcery points, convert your sorcery points into sorcerer spell slots, take a short rest regaining your warlock spell slots...lather, rinse, repeat...until you have infinite spell slots.
It works because there's no RAW requirement to take a long rest and there's no RAW limit on the number of short rests you can take in a day, besides the time limit of 24 hours in a day and short rests taking 1 hour.
The flaws are: your sorcery points are limited by level. The exchange rate is not good. And you never regain hit dice as you never take a long rest, so you're a spell-sink for healing. This is typically mitigated by going Divine Soul sorcerer which gives you access to healing spells...and with infinite spell slots...well, no problem.
As low as 3rd level (sor2/lock1) you can generate 16 1st-level spell slots in a day (3 sorc, base 2 spell points = one 1st-level slot, 24 short rests generating 1 spell point each = 12 1st-level slots). As you level your spell point cap goes up as do the spell slots you get from both sorc and lock. It's dumb as hell, but it's RAW.
You forgot the spellcasting multiclassing rules.
Pact Magic. If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.
It explicitly lets you use Pact Magic slots to cast non-Warlock spells, but nothing states you can use Pact Magic slots to fuel other non-Warlock class features.
Outside of Coffeelock, using Warlock slots to fuel non-Warlock class features doesn't cause a problem. With Coffeelock, it does.
So you read the rules strictly, and state "there is no rule stating that Warlock slots can be used to fuel non-Warlock class features", and the Coffeelock dies. All RAW.
Now, the common sense version of 5e multiclassing is "slots are slots are slots", but that isn't what the rules actually say.
Right. Now have the players who have PCs who are good at combat relentlessly focus on combat and push away from anything that's not combat. So your ranger may be great at exploration, but you have two players forcing combats all the time so you never get a chance to shine.
Note that this a problem of characters obsessed with combat, not optimization.
Your problem players may be both obsessed with combat and optimization. But the optimization isn't the problem here. If their PC where incompetent at combat and they still Leroy Jenkinsed every single situation, the problem remains basically the same.
So to accommodate two egregious optimizers I should stop enjoying playing the game the way I do and start enjoying playing the game the way they do. That's amazing. Like literally everyone and everything is the problem except the optimizers themselves. This is just silly.
The option of "don't play with them" was presented.
The option of "use mechanical levers to fix optimization issue" was presented.
The option of "modify the game so they have fun as well" was presented.
Every option was shot down as something you don't want to do.
What more, you are using "optimizer" to include "a player who refuses to do anything but combat and is disruptive at the table when things don't go their way".
You appear to have 4 problems.
1. 2 players uninteresting in anything except combat.
2. Those players are disruptive when they don't get the combat they want.
3. Those players optimize their PCs to be good at combat.
4. You don't feel any responsibility to do anything about any of the above.
The obvious fix is "don't play with people you don't want to play with". Assuming you
do want to play with them, and the status quo isn't quo, you
actually need to change your behavior. You are in control of your own behavior, and the situation isn't what you want, so your behavior is the lever you have.
If you don't want to just bitch about the problem, you have to abandon #4.
1. There are entire genres of action movie where plot and stuff happens in combat.
Look up the flirty flight stuff of Bearup --
Or the myriad of running battles you get in superhero films or pulp inspired stuff.
Consider moving combat from a grid to theatre of the mind. Add in dialog and plot and even exploration
during the fight.
Being harried by dire wolves as you cross the moors, occassionally having some of them charge in and attack. The dire wolves goal is to make the players slow down and get overrun by the incoming horde; so combat mechanics are there, but so is exploration. "Stop and fight" is a loosing strategy.
Infiltration with combat and interrogation. Make it feel
safer to do crazy naughty word like infiltrate an enemy base and engage in a limited amount of combat while getting your face character in to interrogate the Vizer and not a suicide plan; meanwhile, a frontal assault is a suicide plan.
This doesn't have to be
all of the time, but making non-combat pillars include some combat mechanics may make the players less dismissive of that content. And in time they might even enjoy it, and it might make the non-combat obsessed players have more fun as well.
This doesn't solve everything. It isn't intended to.
2. This is an interpersonal skills problem. But convolving this with the other problems
does not make it easier to solve. "You are being disruptive" is different than "you are making a strong PC". If you split those two up, you might have more progress with your problem players.
Talk about disruptive behavior as disruptive behavior.
3. There is lots of advice in this thread about this, which you discarded. Look for it and use it.
Nerf when you have to, but only when you have to (pun pun, coffeelock, etc). Leave lesser optimization alone, and use the DM's levers to reduce the problem.
If 1/3 of the game is actually combat, and the optimizers optimize for combat, and they aren't disruptive, and the other players relative competence is sufficiently similar (because you used your levers), then combat optimization becomes
not a problem.