First get the child their HK passport. The child can legally stay in Thailand but will need a passport to leave. Then you can get them an O visa to re-enter.
Make sure you get your certificates legalised before you leave the UK as you'll need this for a work permit/extension later. Much easier to do it from the UK rather than from Thailand.
Not necessary if the new passport is issued in the UK, as it will be stamped upon arrival in Thailand. A letter is only required for a "virgin" passport.