How to make electronic systems which work below −40°C (−40°F)?
Most semiconductors will function fairly well at −80°C, maybe reduced gain and perhaps some increased speed that could affect a marginal design. The reduced gain can cause oscillators to not, although if they are already going they may continue as the temperature drops. I've run plenty of electronics immersed in liquid N2 and not much unexpected changes from 300K to 77K. −80°C is about 200K so not even halfway to 77K. Liquid helium at 4K is another matter. There is some information available in the literature, but getting guarantees from the manufacturers is probably not in the cards due to a lack of market that would interest them. Things that are guaranteed to work at cryogenic and very high temperatures tend to be pricey. Characterizing them yourself is easy for simple parts and very difficult to do with 100% assurance for very complex parts.
Most passives like resistors won't change much either – a bit of shift from the temperature coefficients. Ceramic capacitors may shift a lot more.
Things that don't work well, or at all, as fraxinus says, are batteries and electrolytic capacitors, and they may well be limiting. Other things like DPSS laser tend to have a very narrow range.
As I understand it, the Perseverance rover has a long-life heat source on board (a Pu 238 radioisotope RTG), so getting too cold is not an issue. Including a chunk of weapons-grade plutonium is not an especially practical approach in most applications.