Wow dude, that is a LOT OF POSTS in a row.
Just use VCE to set a team variable on the team spawns and check for that variable when the player uses the wrench on the toolbox. If team = 1 (blue) and they're using it on a red toolbox have it send the client message that they aren't allowed to do that.
Alternatively, you could allow engineers of both teams to make the sentries, but who makes it does not determine whose team its on. So if a blue engineer makes a red sentry, it will kill him.