One situation where you might have to be careful from a legal point of view is when the piece of music you're copying has already been released under some legal agreement with one organisation, and you're writing music to be released under a different agreement with a different organisation. There's no point going into specifics, as laws vary by territory, and contracts vary by company, but "it's your music" doesn't necessarily hold if you've signed some of the rights away!
Aside from that - copying yourself is almost inevitable; every composer is going to have a limited range of knowledge, and capability, and will be more interested in some areas of musical space than others, so some repetition in output is bound to happen even if unintentionally. This itself is no bad thing, as an artist's fans / audience are likely to expect artistic output that exhibits the same strong points.
You've mentioned some ways in which you can recycle your own output - putting the same ideas in a different context. I always enjoy hearing Steve Hillage's guitar playing both in the earlier prog rock context, and in his later techno-influenced work.
As well as extracting ideas, it might also be interesting to take actual audio samples of your previous work and incorporate them into newer work. Of course working with chunks of audio has limitations, but it has often been said that limitations are great for spurring creativity.
Frank Zappa in his later years became keen on recording parts carefully such that they would be able to be re-used in later mixes and later works.
Large-scale borrowings in the pop world are commonly released as remixes. These are often done by other artists or producers, but it might be interesting to remix your own tracks.
Possibly, the most fun may come from going back to a piece that written a long time ago and revisiting it with the benefit of greater knowledge and experience. In fact I'd recommend that young composers (especially those with the benefit of time on their hands!) write (and keep a record of) as much music as possible partly because it may be of great interest to their future selves!