I am wondering about this. I have heard that in General Relativity (GR), the energy in a space-time may not be well-defined. If that is the case, then it would seem "conservation of energy" would not be well-defined, either. If that is so, why can't (I presume) this be exploited somehow to create a perpetual motion machine?
Conservation of energy is still fine the following sense: For any region, the energy at a later time is equal to the energy at the current time, plus the net flow of energy in and out of the region during the interval of time. And the energy in question includes the rest energy of bodies, their kinetic energy, their thermal energy, etc. Anything except possibly gravity itself.
So what changes in General Relativity? If you have a bunch of particles at rest with respect to themselves in a spherical shell, you could allow them to fall into their common center, and steal their kinetic energy and send it to your friend (every region in between will see the energy flow through it). But now the parts of the shell are closer together, and you can't get them back up to repeat the process without giving them more kinetic energy to move away from each other. So it's not perpetual motion.
You can even try to set up a concept of gravitational potential energy to keep track of how much energy can be stolen, but it is finite and when you steal it you have now decreased the capacity of what can be stolen by future generations. It isn't much different than extracting coal or oil and burning it, its not free energy.
There are even exotic sounding ways to get energy, for instance you can slow down a spinning black hole and get some energy, but then the black hole spins less quickly. And there is a finite amount of energy you can steal in that manner.
As for perpetual motion, that generally is about thermodynamics and how you deal with that, it's not about a particle that simply orbits forever (or a shell that oscillates in and out forever) because it is left alone without any disturbance, no particles or heat bumping it in the slightest. A perpetual motion device needs energy for nothing to fix the bumps and jiggles of random interference. General Relativity isn't designed to give you free energy,