I think it a bad idea unless you are using good pro equipment.
I would not spray it with Krylon rattle cans but if you seal and prime the trim first, I guess it could work. Usually when spraying anything by whatever method, you spend a lot of time masking EVERYTHING near off to protect from overspray. From my experience, with a nice angled sash brush and decent paint, you can have the trim done in a fraction of the time it takes to prep for spraying.
I played around with all kinds of ways to make it faster, I ended up using a 3/8 nap 3" long roller and a sash brush to tip it out.
By the time you get all set up just getting ready to spray paint I could have had time to have painted a couple of pieces.
Narrow pieces like that would also waste a lot of paint.