Well perpetual motion is impossible because things like gravity and such change over time.
Erm, PMMs are impossible, yes. But not "because [things] change over time". In fact, there'd be a good argument for being able to create a PMM if gravity
did change (invest in gravity when gravitational potential is cheap to achieve, then when it's more potent push that power into some other form of storage that's now a better investment, perhaps...and/or, of course, vice-versa), although I'm slightly sceptical (would at least need an oscillating relationship, and you'd have to have enough advantage to overcome the inefficiencies and losses in the device, never mind any energy you're 'tapping off' the PMM for actual useful purpose.
Every PMM design that does not actually get fed energy from an external source (thus not making it a PMM) is essentially bunkum in a constant physical universe, and usually worse than useless because of even the standard energy losses (friction, etc.) inherent in the device meaning they aren't even a good way of storing the energy you may initially supply to them.
And I personally [think?] all matter was made up of energy at some point. So maybe in the far future we will tear solar systems apart to make an all mighty kingdom
IMO, that'd just be accelerating heat-death (or a similar universal process) locally for short-term gain. Which is not to say that it won't happen, just I can't currently conceive of any advantage.
(Going into SF, 'to support a bubble of space-time immune to the end of the universe' is one idea, I suppose, but if the death of the universe is via Big Rip or actual Heat Death ends, you won't have had the system around any longer than the end of the universe itself anyway, so prematurely ending it can only rerally work by concentrating the gained energy into preserving a far smaller volume of space slightly out into the increasingly void-like future. If we do end up in a Big Crunch situation, there might be good arguments for making such a sacrifice (especially as more and more matter comes 'within reach' of your energy-farming scenario) in order to try and survive the process and (hopefully) find oneself as a precursor civilisation in the universe immediately after the Big Bounce. But there are arguments against that (e.g. you have to fight against a universe's worth of contraction, and even if you could utilise the rest of the universe as 'fuel' for this task, you'd lack the quantity of universe that you were holding within your Crunch-Proof bubble). However, this is far more speculative than it is scientific. I'm sure someone like Hawking would be able to pepper my thoughts through with buckshot in an instant.)
((Another SF idea that just came to mind is to 'use up' a bit of one universe in order to power a trip into a parallel one. Except that in the short story on this subject that just came to mind, the errant parallel-hopping traveller hadn't taken into account that the entire substance (matter and energy, perhaps even existence) of the source universe had to be converted into energy in order to make the jump... Someone he visits and tells of his tale (while fruitlessly trying to find his way home) works out just too late to tell him how hopeless and destructive his quest is before he initiates the process again on his way to his next soon-to-be-doomed destination... Also, I would these days I also might apply the same caveat (as per the bubble-of-protection example, above) regarding his not being able to utilise the matter and energy inherent within his travelling self...
But that's still SF anyway.))