There are a few considerations to think about here:
Each search engine treats a 302 redirect differently, so just because it could be a correct use case in one search engine, doesn't mean that it won't negatively impact you for another. This is a major reason why most SEOs do not recommend using 302 redirects, they are more harmful then beneficial.
a 302 redirect, in the situation you explained, could be a correct use case if the redirected destination was on the same domain. So, if www.thisisyourdomain.com 302 redirects to www.thisisyourdomain.com/temporary-site then it could be a correct use of the 302 redirect. However, the first point above is much more important and I wouldn't recommend doing this.
If you do want to put up a temporary site for that downtime, then I do suggest you apply canonical tags back to the original site AND you prevent search engines from indexing it entirely to be safe from duplicate content penalties. Then, I also suggest not to have a 302 redirect, but an error page that says your team is working on fixing the problem and they can use this alternate site (provide a link) in the meantime.
However, I would avoid it altogether. If your site must remain online during these unexpected downtime experiences, then it is probably because you are losing a substantial amount of revenue (e.g ecommerce websites with frequent transactions). If that is the case, then I recommend investing in a server setup that can accommodate this scenario - they can be expensive, but you're generating revenue so it should fit into someone's budget.
You can also go the route of using a CDN to deliver cached content to allow the visitor to continue to browse a cached version of the website while it is offline. You won't be able to take transactions, but if the downtime is short their experience may not be interrupted - look at Cloudflare's Forever Online feature.
If your site isn't losing revenue while offline, then improve the setup to minimize downtime, throw up a nice error page letting people know, and don't mess with those redirects.