I mean, if we actually last another 400m years, or even 1 million it's completely possibly that we could slowly shade the Earth with solar shades orbiting the planet. It does not take 'much' energy to reduce the energy input to the planet when you can move things on very long timescales.
With any luck, it will happen in just a few centuries as waste heat from industrial processes grows without bound, unless industrial expansion moves off-world before then.