MariaDB & Percona are drop-in replacements for MySQL – you should be able to remove MySQL and install either one without any issues, though ServerPilot does do things a little differently :-).
To make sure removing MySQL won’t break something on their end, I’d definitely recommend getting in touch with them before you try.
That said, running a full stack on 512MB may be problematic. We normally recommend 1GB as MySQL requires quite a bit of RAM (even if you swap out to MariaDB or Percona). This will generally prevent the all-too-common service crashes (due to MySQL not being able to acquire enough RAM). Even our one-click application for WordPress is set to require 1GB (up from the previous 512MB).