No, your employer has to actively stop you from this in germany
The Arbeitszeitgeseztz is very clear in regards to maximum permittable time per day: 8 hours of work time on at most 6 days a week (Monday - Saturday) are allowed under normal circumstances.
Only in exceptional cases, 10 hours on a single day on the 6 work days in a week can be permissible. Even then the average work time may not exceed 8 hours per day worked over 6 months/24 weeks. That is regulated in the Worktime Law §3.
If the work contract mandates fewer hours or days, that does not change the allowable time per day at all: if you have a 2-day week, you may work 8 hours on both days regularly, and 10 only when your average hours per day over 6 months stays at or under 8 hours.
ArbZG §3: Die werktägliche Arbeitszeit der Arbeitnehmer darf acht Stunden nicht überschreiten. Sie kann auf bis zu zehn Stunden nur verlängert werden, wenn innerhalb von sechs Kalendermonaten oder innerhalb von 24 Wochen im Durchschnitt acht Stunden werktäglich nicht überschritten werden.
This is strict liability - intent does not matter, it doesn't matter that the employee instigated it. The employer is on the hook for up to 30 000 € per case according to ArbZG §22. Unscheduled audits from the official side on performed work hours, following documentation requirements and related issues happen, among others, in construction or road transport regularly. You'd be surprised: Customs and Border Police is tasked with enforcing those requirements on truckers and construction crews.
Among the employer's duties is to keep their employee healthy, which includes sending them home after 8/10 hours, not giving them work (or time!) till they have had a chance for his mandatory rest time under ArbZG §5 of 11 hours, and to send them home if they exceed the allowable average work time over 6 months and forcing them to take time off. It even can include forcing the employee to take holidays so they can rest and recuperate!
[Assume] the contract says 40hours. [...] For the purpose of the question assume Bob would only work on non-holidays.
Under german ArbZG this number can allow a lot of variation, such as all these that are designed to balance out within one week for simpler math reasons:
- 6 days at 6 hours, 40 minutes, plus-minus a little overtime
- 5 days per week at 8 hours on average, sometimes a little more, sometimes a little less.
- as an extreme case: contractually 5 days are contracted for, the employee is only working 4 days per week at 10 hours (2 of them 'overtime') and always takes the 5th day fully off from the accrued overtime.