Consider the following scenario:
I am playing a Divination Wizard with the Lucky Feat. He is sufficient level to have access to the Portent feature. He rolls his Divination Dice for the day and rolls very low on both dice.
An enemy attacks me and rolls a Natural 20, a Critical Hit.
My Wizard decides to use Lucky in an attempt to avoid the crit, rolling an additional D20 for the attack and then choosing the lower roll as the result of the attack.
Before the aforementioned roll is made as per the Lucky feat, can my Wizard use the Portent feature to replace the Lucky roll the player is about to make with one of the Divination Dice, thus ensuring a failure?
This is the exact wording of the Lucky feat (PHB, p. 167):
You have 3 luck points. Whenever you make an attack roll, an ability check, or a saving throw, you can spend one luck point to roll an additional d20. You can choose to spend one of your luck points after you roll the die, but before the outcome is determined. You choose which of the d20s is used for the attack roll, ability check, or saving throw.
You can also spend one luck point when an attack roll is made against you. Roll a d20, and then choose whether the attack uses the attacker's roll or yours.
This is the exact wording of the Divination Wizard's Portent feature (PHB, p. 116):
When you finish a long rest, roll two d20 and record the numbers rolled. You can replace any attack roll, saving throw, or ability check made by you or a creature that you can see with one of these foretelling rolls. You must choose to do so before the roll, and you can replace a roll in this way only once per turn.
Each foretelling roll can be used only once. When you finish a long rest, you lose any unused foretelling rolls.
We know from this question that Portent overrides Lucky if the two are used against each other.
We know from this tweet that the Portent die replaces "a d20 roll only, not any modifiers."
We know from this question that Portent overrides advantage or disadvantage by replacing the end result of the roll. Furthermore that Lucky (the halfling trait, not the feat I'm talking about) deals with the die roll whereas Portent deals with the check as a whole.
Can you use Lucky to force a new roll and then use Portent to replace said roll before it happens?
This may come down to whether or not the Lucky roll counts as an "attack roll" itself or whether the "attack roll" was the original roll and the Lucky roll is some other type of roll.
Alternately, it may be that Lucky replaces a specific die roll, whereas Portent replaces the entire check as a whole and therefore since the check has begun, you can no longer use Portent.
Whatever the case, I'd like to know how this interaction works.