To have 18 skeletons RAW you need to be at least an 11th level Necromancer, have 18 corpses on hand and spend a 6th level slot (5), three 4th level slots (9) and two 3rd level slots (4). You have to spend those slots every single day if you want to keep 18 Skeletons around. That is all the 4th and 6th level slots and two out of three 3rd level slots for an 11th level full caster.
You can just stop right here with nothing else, no homebrew at all. A Necromancer running around with 18 skeletons on hand is already weaker most other full casters and most 2024 martials because she is spending most of her most powerful spell slots on the "Skeleton Tax" to keep the undead army around.
Not sure who started the 18 skeleton thing. Multiples of 4 (8, 12, 16) are better.
Anyway, having 18 Skeletons RAW isn't as difficult as you described.
You really only need to be a 7th level Necromancer if you're willing to work more than a day on it, 8th if you can wait a short rest, or 9th if you're really impatient.
1. Source the corpses / pile of bones (ir)responsibly. My favorite necromancer also happens to be a member of a faith with no qualms making - or providing - corpses for free, much less for generous 'donations' to their temples, so I usually don't have any material issues. When I do have material issues... that's what bandits are for.
2. Animate your dead. If you're a Necromancer Wizard, your Animate Dead targets one additional corpse or pile of bones. That's 2 for a 3rd level slot, 4 for a 4th level slot, 6 for a 5th level slot, etc. So at 9th level, you'd use your 1 5th level and 3 4th level slots to animate 18 (6 + 4 + 4 + 4) undead. At 8th level, you'd use your 2 4th level and 3 3rd level slots to animate 14 (4 + 4 + 2 + 2 + 2) undead, short rest to get back a 4th level slot via Arcane Recovery, and use it to get your remaining 4 undead. At 7th level you'd use your 1 4th level and 3 3rd level slots to animate 10 undead, short rest to get back a 4th level slot via Arcane Recovery, and use it to get 4 more undead (total 14). The next long rest, spend 1 4th level spell slots and 2 3rd level spell slots to maintain control over the 14, short rest to get back a 4th level slot via Arcane Recovery, and use it to get your last 4 undead.
3. Maintain control of your minions. Keeping control of already animated minions is less spell intensive than animating them. A 3rd level slot lets you maintain control over 4 undead you've animated, a 4th level slot 6, a 5th level slot 8, etc. Maintaining 18 undead would thus only require 3 4th level slots or (if you're doing this at 7th level) 1 4th and 3 3rd level slots.
Side note, if you're using all your high level slots just to maintain undead, you're doing it wrong (you have too many undead). Using all your slots to get your squad up is certainly bold, but fine though.