I have some D3s and one A3 machine, yes I know, it wasn't the smartest decision to buy them at the time... but that's life...
Is there a way to re-flash the boards with some firmware to make them profitable again, on some other algorithm?
Never owned a D3s or A3 so not sure it applies but certain Antminers can be undervolted either by firmware or by some "pencil" mod and you can undervolt the chips, lower the frequency and you can mine at a slower speed but with a more efficient and quieter setup. I actually had no choice but to run a Antminer S4 at 60% of its advertised speed because I couldn't stand the noise at full speed. I undervolted it to the max and lowered the frequencies and it was basically as efficient as an Antminer S5.
Regarding reflashing to mine a different algo, its impossible. You can do that with CPU, GPU and FGPA mining but never with ASICs. Hence why they become obsolete so fast in the crypto world.