Here is a more refined version of my rotator harvester using the rail basic swapped with a rotator.
The key is making sure you spawn the thing in the stopped state.
In a stopped state the rotating harvester component is docked to a rail basic. The basic remains connected to the storage whether loaded/unloaded or you logoff/on or server restarts.
If the miner is running at the point of previous conditions, the rotator is seen by the game and the connection to storage is removed.
Have a play an see what you think.