A command would do the exact same thing as that but instead of pressing the 'r' key you type /checkpoint. So the 'glitching' will be equally the same.
You would need to store the data for the checkpoint for that map for that player, take into account multiple players using the command, it is a lot of effort for the same thing as enter/r respawning.
So my advice is that you are best off not worrying about this command.