^ I have done that with low nap carpet, but nothing long. The longer the fibers, the less that works, as those fibers "pop" back up & stick to the fresh paint.
I've used the wide painters tape w/ some success. It wasn't perfect, but it was fine - I'm definitely a perfectionist but had to realize that is a pretty minor detail away from most people's attention, lol. Ideally, if you had shoe moulding you'd remove it & paint separately, paint the baseboard, then reinstall the shoe.