John,
Basically what you describe is somewhat safe but not according to the National Electrical Codes (NEC).
The wiring, if done properly is protected but the 3 hp, 240 v, 30 amp motor is left unprotected. A motor starter rated double pole safety switch with the appropriately sized heater...