Inconsistency using UDP with two ESP8266's

my best bet is that you have a conflict in your IPs and may be Slave 1 / Slave 2 are using the same own IP.

On long term when you goal is to maintain one COMMON slave code whitouth any changes between the slaves, I recommend, that you store the configuration data for each device within the device. Use the library preferences for that purpose.
When you have stored your IP (or other identification data) in preferences you can still update all slaves with the same code - the code should read out the identification from preferences.