But if Ghana became a wealthy country and chose not to accept this waste, it will end up in the next one.
The waste exists regardless, and the economic incentive for the original market "export" it, that is, hide the problem, and the receiving country to reluctantly accept it for some other consideration, whether it be money or state aid or tariff-free export of something else, will always exist while the waste does.
Re: "badly disposed of waste dump", the difference between this and landfill anywhere in the west is largely just the soil on top. Staggering amounts of recyclable and dangerous stuff still gets thrown away in inappropriate ways right near where you live, I imagine. And if the global North exports waste to the global South, sooner or later the scale almost inevitably overwhelms the receiver.