Charge-Density-Wave Control by Adatom Manipulation and Its Effect on Magnetic Nanostructures