The rating is a maximum power value, and your MBP will draw only what it needs. Your MBP needs up to 60W in order to work at full power AND recharge the battery. Using a 24W charger will only charge the battery if the MBP is using less than 24W to run.
However, because 24 is much less than 60, it's likely that this power source will be insufficient to power the MBP and recharge the battery. If the MBP is sleeping, you might charge the battery very slowly overnight. If in use, you might charge the battery very slowly, or even just make the battery discharge more slowly than normal. I've used 45W power supplies with 60W Macs and they have charged slowly while in use; but when the Mac works hard, the battery level falls, though slower than without the supply.
I'm prepared to say that using a lower-wattage supply will not harm your battery. Whether the actual device you make is safe will depend on you.