What do you mean by ventilation flue? A chimney previously used for a regular fireplace / to discharge exhaust fumes from some fuel burning appliances?
Is this ventilation flue old and abandoned / unused?
If it is an abandoned chimney, was it properly sealed at the bottom to prevent heat loss and condensation buildup inside of it and protected from rain penetration at the top? This is to make sure that nothing drips on top of the new fireplace enclosure.
Is that boxed flue enclosure you’re asking about serving only aesthetic purposes or supporting something as well?
When you cut / remove section of it, would the remaining part still remain in place?
Will you have adequate clearances around the electric fireplace enclosure (if any are required / should be listed in the manual) after placing it in the opening?
There are too many variables and without some additional information (picture(s) of this area would help as well) I can’t really give you any definite answers.