It can be done, but not with just any guitar.
A friend of mine had an old Squire strat that he and his brother (a luthier in the makes) upgraded it with some new pickups, electronics, and all hardware, and it is one of the sweetest guitars I've ever played! However, just because it worked for him, doesn't mean that it will work for anybody.
The guitar you want to upgrade can be a cheap guitar, but it still has to be a "good" guitar.