substitute device; replacement unit
Used for a device (e.g., phone, tablet, laptop) provided as a temporary replacement when the original is being repaired or is unavailable.
Can I borrow a replacement device while mine is being repaired?
replacement aircraft; substitute plane
Specifically refers to an aircraft substituted for the originally scheduled one, often due to maintenance or operational reasons.
Due to aircraft scheduling, this flight will be operated with a substitute aircraft.
代わり is a general term for a substitute or replacement, not limited to devices or aircraft.
Compound of 代替 (substitution) and 機 (machine/aircraft). The exact historical derivation is uncertain, but the word follows standard Sino-Japanese compounding patterns.