What I don't see mentioned here is that just monitoring the swap usage is not as good as monitoring the swap in AND swap out activity. You want to monitor that, because if you only swap in stuff without reading it back soon, that is actually already not important. A lot of swap in / swap out this means that you have not enough memory available (or misconfigured) and your system is going to be slow and wear and tear will hit your disks.
For most of my systems, I use a combination of swapiness=1, zram as first tier swap and if necessary and available a second one on disk. I could not eliminate swapping completely and it is happending mostly in containers. They sometimes need just more RAM that they have and begin to swap, maybe you experienced something similiar.
Edit: adding example
Code:
root@proxmox ~ > uptime
09:43:52 up 46 days, 14:27, 14 users, load average: 0.35, 0.45, 0.56
root@proxmox ~ > free -m
total used free shared buff/cache available
Mem: 64150 16178 43820 884 6325 47972
Swap: 9638 171 9467
root@proxmox ~ > cat /proc/swaps
Filename Type Size Used Priority
/dev/nvme0n1p2 partition 5676028 0 -2
/dev/zram0 partition 4194300 175616
root@proxmox ~ > sysctl -a | grep swap
vm.swappiness = 1