There's chaos and death regardless. Smooth power transitions in feudal society are a joke. It's often worse without an heir, but there tend to be messes regardless.
As for the actual topic, artificial insemination should work. It's not like the technology behind them is really all that sophisticated, and the emperor has the budget to have things machined to high precision. Plus, you know, magic.