You can do whatever you want as DM, and there are many different views about what’s good and bad to do as DM.
I would say that the main issues I see with your plan are:
1) You’re forcing outcomes, and forcing them all to die, and not telling them that’s what you’re doing, at which point you are not refereeing a game situation. Instead, you’re telling them to make characters they want to play, and then deceiving them that they have a chance to survive, and then you plan to force to kill them no matter what they do.
2) If they figure out that you’re forcing outcomes and not letting them play in a dynamic game situation where what they do matters, then you’re setting up an expectation that you’ll keep doing that. To avoid that, I would either tell them up-front, or afterwards, and promise not to do it again. Or, admit that you intend to reserve the right to force a lot of outcomes and railroad what happens.
Personally, I would tell them you intend to run a short prequel campaign, and to make higher-level temporary characters for that. Then set up a difficult but not impossible-to-survive situation and run that fairly. Have it end though and establish the past situation whether they survive or not, but have effects on the later campaign situation based on what they manage to do. That way, the prequel campaign actually has stakes and effects on later play.
So they may likely all be wiped out, and the stage will be set for the long-term later campaign, but there will be chances for some or all of them to survive somehow and accomplish some things, which will have some effect on the starting situation for the later campaign.
At least, that’s what I’d tend to do with your idea.