If the bounty is tied to the ship, can I just strip all the modules out of the ship and sell it? Buy a new one and fit the engineered modules back?
You can, however...
You'll sell that ship at a considerable loss (25% I believe).
And the Modules that come out of it are flagged as "Hot" as well, which will make the new ship you put them "Hot" as well. Perhaps if you sold the whole thing, Engineered Modules and all and bought a new one, with new modules, and re-engineered them, you might get around this, but your losses in doing so, as "hot" modules also sell at a loss, would likely exceed the cost of your crimes. Plus it would aggravate you to no end.
So no, you kind of can't. They thought of this and closed that loophole too.