Spotify - Un/pause with 4 finger gesture

Yes. You can use AppleScripting to specifically tell Spotify to play/pause.

I created a Notch Floating Menu (called 'Notchify') to control Spotify from the notch. If you have a MacBook with a notch you could have a try and see what you think using that, and you could also see an example of what the AppleScripts I use to control Spotify look like to assign to your 4-finger-tap trigger.