I've painted half a dozen frames at home though I've never stripped all of the factory paint from all areas of a frame. On paints, I have been disappointed with Hammerite brush paint. A glue like consistency that never fully cured. Recent experience with a brush enamel paint in gloss black from Halfords which looks great but have not used the frame so cannot comment on adhesion/longevity. Previously found that Halfords rattle cans gave an even looking coat but it is easily scratched. I have also heard of people using Montana rattle cans, which is graffiti paint thought to have good adhesion.
A few tips in no particular order:
Spraypaint gives a thin coat and so you will see imperfections in the metal, and so thorough sanding is important to flatten the surface. This requires various grades of abrasive paper down to 800 grit. Cheap abrasive paper is a false economy as it wears out fast.
A good quality anti-corrosion primer is vital or rust will bubble through in future, even if you think you've taken it down back to bare metal.
More sanding between coats is needed with brush paint. It is really fiddly trying to sand the paint at the joints of a bike frame, or around a headtube or bottom bracket, so spray is preferable here. You will lose definition at the lugs on a traditionally constructed steel frame.
The addition of thinner allows brush paint to flow, but too much will cause it to drip, which you may not notice til too late. It's difficult to get the correct viscosity and that changes as the paint in the tin evaporates during a painting session.
Environmental conditions matter. Weather needs to be dry and warm otherwise you will see poor adhesion. In the UK this probably means waiting til summer.
The frame needs to hang for many weeks between coats, otherwise the lower coats will take even longer to cure and your paint will scratch easily. Paint shops don't need to wait as long for the paint to cure because they have different type of paint.
Insects and dust can ruin a paint job. This may mean not painting outdoors, so your house will smell of paint fumes the day you do any painting. You won't be able to cook on a gas flame that day. It's not healthy to breathe those fumes so you should wear a respirator with charcoal filter while you're painting; ideally you'd leave the house for a few hours as the paint is drying.
Pale colours can take three times as many layers as dark ones. So black paintwork needs at least two coats, white paint needs half a dozen or more in addition to primer.
I reckon I have spent as much on abrasive paper, primer, and paint for one frame as it would cost to have a powder coater do the job, plus many hours across many weeks (due to cure time).
Factory applied paint is remarkable stuff: it's very hard with superb adhesion. I say factory paint, but what we get on a new bike is a heat treated industrial finish. By contrast, the paint we consumers can buy in rattle cans and tins is a quite different substance, i.e. it really is just paint. For me this meant lowering my expectations regarding its longevity.
So painting at home makes good sense for retouching a patch, or painting a single tube. It makes some sense if you're not stripping the factory paint on all portions of the frame and if you're not changing the colour.