It seems that "마지막으로" can be generally used for the whole sentences provided by you.
(내가 마지막으로 여기 있었을 때는 12살 밖에 안됐었어.
마지막으로 했을 때는 훨씬 더 잘했는데.
오늘은 그가 마지막으로 공연하는 날입니다. 이 공연 후 그는 은퇴할 것입니다.)
But you can also apply slightly different forms like,
(지난번엔 훨씬 더 잘했는데.
이 공연은 그의 마지막 공연입니다.)
But for the "he will be performing...", you cannot use "지난번엔" because you are not indicating a previous event. I hope it helps! :-)