I have a standing policy in every team I run: if you have to work outside of hours, double the amount of time that you worked and round up to the nearest day. Take that many days off as soon as is practical.
The traditional “flex time” is nothing more than a zero-interest temporal loan, encouraging endless borrowing from the back of Sometime After Never.
I deliberately impose a stiff interest rate on that sort of borrowing within any organization I run, because while I recognize that we do need to field emergencies, we also want to penalize the “every day is an emergency” pattern so prevalent in the industry.