maybe i beign too paranoid today but i have not seen any reference to what to do when the command or damage cards deck runs out because it's fully played or discarded.
Most of the people take on that they have to reshuffle the discarded cards and keep going with draft, but i saw some youtubers gameplay that just stop drafting commands and i feel that it is very logic, because at the end of the missions reshuffle and keep drafting is just free and infinity repair points or swap command line ability due of scrap effects.
For damage it's more obvious to reshuffle the cards due to minions keep doing damage.
Although to be honest I don't see how you can run out of command cards. In almost every level there is a a built in time/turn limit (not real time)
Spoiler (click to reveal)
Either the boss destroys the world or the lava overflows or the bomb explodes
While I have never run out of damage cards (or come close) I would reshuffle them. I don't know where it says it in the rules but I am pretty sure it does.
Don't stress about it. And in general with this game, whenever you don't know how to deal with a scenario always rule in the way that makes it harder. So in this case, getting a damage card when damaged is harder than being immune to additional damage (also it makes more sense)