Yes I would suggest you look at the Powercalc custom component.
I would create a binary sensor heater_on and then create an automation that flips that to true when your consumption goes over 6000W.
Then you would set up Powercalc with your binary sensor and use a manual power setting of 6000W. Powercalc will then do everything you need (and probably more!)
Of course if anything else puts your consumption over 6000W then you will have inaccuracies….