I want to clarify something about that "twin" of the Perseverance rover that you've mentioned, something that won't easily fit in a comment.
NASA built a twin of the rover not to have one as a backup rover in case the original rover explodes in transit or fails to land. They built one because they need a way to plan out movements in advance. Mars is so far away that it is impossible to directly control any device on the planet through manual control. It takes radio signals between 6 and 20 minutes to get to Mars, and it takes the return signals just as long to get back. So at best you have a 12 minute gap and worst you have a 45 minute gap between you sending the signals and you knowing the outcome of the command. So you need to be REALLY damn sure that you're sending the right commands, because there is no roadside assistance that can help you if you accidentally hit a rock or get stuck in a sand dune.
To that end, NASA uses the rover's twin here on Earth to meticulously prepare every command they send by first testing it with the twin, without the delay, on a recreation of the Mars rover's immediate area, including the shape and texture of rocks and the layout of the mars dirt they're driving on. Every command, from driving forward to sampling a rock to moving the camera to take a close-up picture is first tested in that simulated environment before sending it to Mars, similar to how a competent software developer tests their newly written software on a separate testing environment BEFORE they push their new code to a production environment.