To confirm, yes, the mods stay with the item. I've got plenty of modded bits in storage for use with other/future ships.
In fact, I'm buying FSDs/etc for future ships, in current ships and storing those.
Example:
I want to Kit out a Vulture for RES hunting/etc. Most of its parts are lower grade than on the ASP (core parts). I'm flying the Asp around to various stations that have the Vulture level equipment, then immediately store that newly purchased item.
Then you go to the engineer you have to for the mods, transfer the mod from the station you bought it, then mod.
Then buy the new ship, and transfer the equipment from the Engineers' locations to the dock you bought the ship.
Reason being, this will save you (likely) hours of jumping 100s of LY in a Vulture to get all the mods done. Much easier to ferry the commodities in an ASP with a range of 40LY.
The key is to use a ship with a higher grade capacity of equipment than you want to mod. Buy it, store it, transfer to engineer, mod, re-store it, etc.
I suppose the easiest would be to use the Anaconda, but I'm using the Asp because it can dock anywhere (for Reinforced Mounting Plates, seemingly only sold at outposts with S/M pads)...
My Python has got 5A thrusters (with G5 dirty drives) on it, until I can afford 6A drives. This equipment started on my Asp. The 5A with DD makes it much more fun to fly in the meantime.