The first athlete to be sanctioned for mechanical doping did exactly that. Inspectors found a bicycle in her pit with a hidden motor. Her excuse was "the bicycle was owned by a friend and was taken to the pit in error". The bike looked exactly the same as the bike she was riding.
https://en.wikipedia.org/wiki/Femke_Van_den_Driessche#Allega...
Except in cyclocross you swap bikes constantly during the race so the current one can be cleaned of mud before it blocks the wheels from spinning.