Bek: I actually had an idea similar to that for the Scout, also replacing the pistol, funnily enough. I thought it fit well because so often as a Scout, you're running around outrunning or dodging past enemies who can't instantly realize you're there, but that one enemy, a sentry, will always instant-kill you before you realized it was in the next room. (of course, it would sense buildings)
I have an idea to replace the repair node, actually. The idea is to keep the Engineer from having to come back to his base every 5 seconds to repair it because some scout got a few shots off before he died. I kinda thought back to how the sandwich fixes the Heavy's problem of health without making Medics more useful.
Basically: A sentry that has about THREE times the health of a normal sentry, but CANNOT be repaired. What it could also do is upon damage, turn on a siren for nearby teammates to "Get your ass over here, I'm takin' damage by some jackass just out of my line of sight." If you notice, people attacking sentries are usually pretty vulnerable, so some teammate is normally the best solution.
What this would do best at is providing a solid defense without the engineer around, but be no better at it if the engineer were sitting behind it. It may also encourage the engineer to think of sentries as a little more disposable; so he doesn't care if it gets blown up, and quickly decides to put a new one elsewhere.
As for spies, it would make sense that sapping it would take three times as long. Also, if engineers get really pissed about not being able to repair, a VERY long-term regenerative health feature could be added (for instance, after 30 seconds of no damage, it will begin repairing 3 health at a time every 5 seconds)
Also, fair warning to anyone thinking of devices that punish enemy spies: No. These result in a chuckle from Valve before being chucked in the "DEFINITE NO" pile. Believe it or not, nice people play Spy, and they're trying to help avoid a stalemate in a way that takes some firm risks and takes a lot to pay off. In TF2, anything that kills or damages without warning is considered unfair (Spy can't attack cloaked, makes a sound uncloaking, Sniper has a red dot, all other weapons are loud). Thus a disguised building would basically punish Spies who are trying to destroy buildings (And one look at the scoreboard tells you: DESTROYING THINGS IS MEANT TO BE A GOAL.) and actually discourage them from doing so.
On a similar note, I'll say the Razorback was a horrible idea for both the Sniper and the Spy. In some ways I think it was a "Well, FINE! Here you GO!" to Snipers whining about Spies. Ironic because it doesn't even help much now that they have no SMG.