You'll have to check with the Phuket Immigration office well before you're going to attempt to do the switch to see if they'll allow it (but they should)
The way it works is you would cancel that ED visa/extension and immediately apply for a new extension based on them being a dependent. They would get an extension that matches your current expiration on your retirement extension.
This is from the Phuket Immigration Volunteer website and lists the requirements for dependent visa/extension.
****************************************