I have not read about using any smartphone can act as a trackpad with Dex on a Tab S4. Only the Note9 can act as a trackpad while it is hosting the Dex environment on another screen.
The best thing is that you can use the touchscreen or stylus or mouse or trackpad in Dex mode. All work good as each other.
Using Dex mode with the stylus is great and how I use it a lot on my Tab S4.