Is it possible to setup a MX record for example.com and a.example.com on the same DNS server in the same zone and is this a good practice?
Some like this:
example.com. IN A 10.24.233.214
a.example.com. IN A 10.24.233.289
example.com. IN MX 10 example.com.
a.example.com. IN MX 10 a.example.com.
It is possible and if you don't have other needs to delegate subdomain to its own zone, it's a good practice.
But, your particular example is useless. The mail is delivered to address under
A
record ifMX
doesn't exist as a fallback, so in your case you if you remove bothMX
records everything will work the same.