Both moves you mention feel slow to me. Slow isn’t always wrong, but unless it’s necessary it’s usually best avoided.
I think the advice BHydden quotes is very applicable to move 19. A black move at D9 instead of white would have worked very nicely with the wall. Indeed it’s almost necessary to have a move in that area for the wall to be worth anything at all. Yes, it’s commendable and often necessary to play more solidly, but sometimes there just isn’t time. I would suggest in this case you have to take sente, play the extension from the wall, and if there are weaknesses left behind… well… deal with those as best you can when they become an issue.
Another note on this move is that it maybe defends the wrong weakness in the wall. Ultimately if white cuts at H16, it’s threatening to extend along the side and eat 1 stone, while you make your wall longer and stronger - that’s not actually a terrible result, especially if it would have cost you a move to get rid of it and you use that move better elsewhere. However, the push and cut at E16 is much nastier and indeed happened later in the game and killed half your group. If you really want a move to defend the wall then maybe look at H15, G14, F14, which also have the advantage of making a bit of shape and extending your group towards the centre a little (although not very much and they’re still slow moves).
(I would feel very similarly about J16 as I do about H16, I’m sure there’s discussion to be had about their relative merits, but in the context they are very similar moves.)
For move 51, the key question is whether the group in the corner is alive without it. If it is alive you really have to tenuki (or play to attack the white group). I haven’t read it out and to some extent it doesn’t matter how I read the situation, it matters how you read it. If you read it as alive without the extra move you just don’t play a defensive stone and leave endgame to the endgame. If you read it as dead without the extra move you have to decide if it’s a big enough group to be worth spending a move on (it probably is unless there’s anything unresolved elsewhere). (Actually, you can connect to M18, so it’s definitely alive without the extra move.)
As it happens, I kinda like your move anyway as it threatens a follow-up of the monkey-jump to T12 to remove much of the white group’s eyespace on the side, but it seems you didn’t see that opportunity even in the endgame (even without the threat to remove eyespace, it’s quite a large endgame move). I’d also agree with BHydden again that something like P12 looks to put more pressure on the white group so I might prefer that to O13 anyway, but again I haven’t read anything out here and that’s just a first impression.
It’s a difficult thing to balance aji with still playing useful and positive moves. I feel these two moves you highlighted were aimed too much towards just trying to reduce aji and didn’t have enough other purpose attached to them. Of course, these things are easy to say in hindsight, and perhaps if you hadn’t played them you would look back at the game and say “oh, I shouldn’t have left a weakness there”, but I guess that’s all part of the challenge!