As someone who used MacBook for ~5 years I miss touchpad especially for switching between workspaces.
The closest alternative (for me) on Ubuntu (Gnome) I've come up with is Super+J/K for switching between workspaces and, as a bonus, moving windows between workspaces with Super+Shift+J/K. Feels almost as productive as on MacBook with touchpad
If you use Wayland on Ubuntu (Gnome), the exact gesture you're talking about already exists, it's just vertical instead of horizontal. It's actually my most used gesture personally.
The closest alternative (for me) on Ubuntu (Gnome) I've come up with is Super+J/K for switching between workspaces and, as a bonus, moving windows between workspaces with Super+Shift+J/K. Feels almost as productive as on MacBook with touchpad