I went with this in the end as it is recommended by a i3 maintainer in [a Reddit post](https://www.reddit.com/r/i3wm/comments/3o2bdn/i3_how_to_quickly_switch_between_current_and/).
You have to install `i3ipc` in your global Python for this first (`pip3 install i3ipc`). Then add a startup script that runs:
```
/usr/bin/python3 ~/.config/i3/focus-last.py
```
And add this to `i3/config`:
```
bindsym $mod+Tab exec "/usr/bin/python3 ~/.config/i3/focus-last.py --switch"
```
G. Gottlob, C. Koch, R. Baumgartner, M. Herzog, und S. Flesca. Proceedings of the Twenty-third ACM SIGACT-SIGMOD-SIGART Symposium
on Principles of Database Systems, June 14-16, 2004, Paris, France, Seite 1-12. ACM, (2004)