For the Heathrow connection to Glasgow, I wouln't worry about that connection, particularly on one PNR (ticket). If you miss it the most likely consequence is that you would be put on the next one, and in addition EDI is also not far off.
At HKG: You can physically do connections very quickly, 25 minutes or so, and you need to be at the BA gate 21 minutes before departure. There are three problems I foresee, if you are a mere 20 minutes late:
1) There's a good chance that the gates will be as far apart as is possible. Now HKG is well designed and you can get from one end to another in a matter of minutes, but it may lead to an unpleasant transfer, particularly if you don't know the airport. You have to clear security from the arrivals level to departure.
2) This is the last BA flight of the day.
3) You will need to get this booked on to one ticket if you want to protect the connection, so almost certainly a travel agent would be involved.
So if you are happy to risk it (I probably would be if one PNR throughout) then my advice is to spend 10 minutes on the day before departure looking at a map of HKG airport, noting where the transfer gates are located. If you end up at a distant gate you best transfer at the nearest transfer gate, since this will usually be quiet. If your arrival gate is near the BA departures (on the front section of the building but on the edge, gates 16, 17 and 18 are typical) then there may be a queue at Transfer, but you won't have far to go, and it's ok to ask the security agent to push you to the front of the queue.