I understand your question, but I'm afraid you've made a mistake in your calculations. An Eldrtich Knight 3/Warlock 17 does not have a caster level of 18 for the purposes of multiclass spellcasting. It has two separate kinds of casting: level 3 Eldritch Knight casting and level 17 Warlock casting. As it says on PHB 164:
Spell Slots. You determine your available spell slots
by adding together all your levels in the bard, cleric,
druid, sorcerer, and wizard classes, half your levels
(rounded down) in the paladin and ranger classes, and
a third of your fighter or rogue levels (rounded down)
if you have the Eldritch Knight or the Arcane Trickster
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.
Note that in the Spell Slots list, Warlock is not listed. You don't add together your EK and Warlock levels, because one gives you Pact Magic and the other gives you Spellcasting, which don't stack.
If you're an Eldritch Knight 3/Warlock 17, then you can cast EK spells using Warlock slots and Warlock spells using EK slots, but neither kinds of casting are improved by having the other class.