I wouldn't trust entirely airgapped devices.
Even airgapped machines might be infected via BIOS/EIFE (and or hardware drivers) malicious payloads.
Once you formatted the computer and reinstall the OS, there is no problem. That aside, if the airgapped device is infected, not going online but completely airgapped, how can it affect the wallet install? No malware that can modify wallet unless you downloaded the wallet from a fake site or you downloaded a fake wallet. As long as the wallet is airgapped, there is nothing that will happen because you only want to use the device for signing transiand some other offline purposes.
Sometimes hardware wallet is not necessary, especially if you need the wallet just for bitcoin. I have an old laptops that is now completely useless. That is how some people old laptops are and they can use it instead to setup airgapped device than wasting money on hardware wallet.