Didn’t have time to look at part 2 of your post. For the first bit, you should use callback context to understand which button was clicked. Gives a lot of additional information, but you’d use something like ctx.triggered[0]['prop_id'].split('.')[0]
ctx.triggered[0]['prop_id'].split('.')[0]
See this post for an example: