Read this first:
https://www.tableoptimizer.com/manualauto-slots/
You will need to create 2 new auto-slots profiles:
1. "bubble", set "Players remaining" filter to (5, 6], set priority to 2
2. "final table", Players remaining: (0, 9], priority: 1
Add "Default" profile to auto-slot X.
Add "bubble" profile to auto-slot Y.
Add "final table" profile to auto-slot W.
For slot Z you will need to use hotkey slot.