Reservoir engineering for maximally efficient quantum engines