There are no short cuts to a really good finish. And it all starts with the material, and preparation.
MDF is probably not the right material for a high quality paint finish. High density fiberboard is a better choice, as it's less porous.

Any wood type product is going to need all of the pores sealed, followed by a heavy coat of primer, sanding, filling, more primer, and more sanding before it's ready for a top coat.

As I mentioned earlier, I seal my MDF with epoxy.
My method will eliminate most priming and sanding, but it's time intensive.
Cut your part about .1mm oversize, and leave an onion skin of about .25-.5mm thick. Do not remove it from your machine!!
Brush a heavy coat of epoxy over all surfaces, especially cut edges. Wait a few minutes, and do it again, so it soaks in thoroughly.
Wipe off any excess from the top surface, as you don't want to have to sand or machine it away.
Let cure.
Cut your part to the finished side.
The edges should be smooth, like a hard plastic, right off the machine. Prime and paint.