I think the current case where an athlete (Femke Van den Driessche) is caught with "bike doping", she was caught by "scanning" her bicycle with a smartphone, using the compass to detect the permamagnets in the motor.
That's now going to be necessary. It's not hard; my horse vet has a hand-held X-ray machine and a detection plate that connects to a laptop. An electric motor is obvious in X-rays. It would take maybe 5 minutes per bike. You only need to scan the leaders, of course.
Domestiques use other kinds of dope as much, or more than, race leaders. Their job is to burn themselves out in service to their leaders. If you dope up your domestiques, the leader gets an easier ride.
The government already uses large X-ray scanners to X-ray vehicles with riders in them. The scanner manufacturers insist these X-rays are perfectly safe to use on humans even though they're strong enough to penetrate steel.
Millimeter waves won't penetrate metal, so they probably wouldn't work on bikes.
Racing bikes are wired to track cadence and speed already which is perfectly legal. These signals are sent to an attached computer on the bike. I don't know if you'd be able to separate out that signal.
For cadence and speed, they are very rarely "wired" anymore. Almost all use ANT+ for communication, it's a very low power protocol meant for low power usage.
Electronic shifting (Other than SRAM's newest) is however wired, but again it's a very low power protocol. It also uses two motors to perform the shifts, but they are very small and external.
The UCI is ahead of the curve here, they've been aware of developments in this field and proactively developed testing procedures. I believe the first case of this was detected using thermal imaging.
I thought most competition road bikes were almost entirely carbon fiber. At least in the frame. Where it sounds like you have to hide the motor, batteries, and wires.
Not necessary. Just weigh the bike. Racing bikes are very light. Bikes with a motor in them are substantially heavier. Any rider with a suspiciously heavy bike gets extra screening.
Real race bikes are artificially heavier to meet the UCI minimum limits and have been so for many years. It is standard practice to add lead weights to the center of the bottom bracket, for instance in order to 'make weight'.
Why don't they just weigh the bikes? Website states the motor weigh's 1.8kg, that would be easy to detect surely? The component spec for the bikes of a race team are probably fairly fixed, so shouldn't be hard to figure out what a bike should weigh?
The UCI limits the minimum weight a bike must weigh. Carbon bikes and parts can get a bike well below that minimum weight, such that some racers have had to tape weights to the bike to get it up to weight when it didn't pass tech inspection.
Now what if instead of taping weights to the bike...
A weight minimum is enforced for these bikes, which isn't really close to the possible minimum. It would be trivial to swap different components out for lighter versions in order to accommodate a motor.