I'd say its about a 50/50 with the party either depleted at the end of the battle, with 1 or 2 deaths, or completely dead.
Lich CR=18+2 - 4 for no gear (maybe -3) = CR 16 (17)
Party fully equipped CR 12 The party can take on a CR12 using 25% of resources. It can take on 4 CR12 encounters; equivalent CR 16.
16 vs 16 (17)
However, the party is a little under so you are looking at a 15 vs 16 (or17).
50/50ish in favor of the lich.
I'd go 16th level max, and stay away from 9th level spells