Could it be Romie-0 and Julie-8 from 1979?
In the future, two rival robotics firms are hard at work trying to create the next major leap in robotics. Both tout their wares at the latest robotics convention. The Mega Stellar Company has released their Romie-0 model of robot, while Super Solar Cybernetics has released Julie-8. However, unforeseen by their creators, Romie-0 and Julie-8 begin to fall in love, harboring feelings for the other.
After the convention, Romie-0 comes to Julie-8, and admits that due to their company's rivalry, they most likely cannot be together. The two decide to run away in order to keep from being broken up. Unsure where to go, they come across a rather shifty individual named Gizmo, who agrees to help them find a safe haven....
I see no mention of memory erasure on Wikipedia, but it is a cartoon from the right time period that re-does the Romeo and Juliet story and they are transported to a "planet of junk named Trash-0-Lot" halfway through the presentation and the villain who kidnaps Julie-8, Sparepartski, lives in sort of a palace made out of trash.