Yes, there's some possibility that a working machine may be damaged by swapping boards with a defective machine.
For example, the defective board may have been damaged by something else outside the board itself. If you fit a good board in that machine, it may also get damaged.
The reverse is also possible. The bad board may have damaged something else outside the board itself. If you fit it to a working machine, it could damage that machine too.
How likely is this to happen? It's impossible to say in a broad general sense. It depends on the nature of the board, the machine and the defect.