I definitely would not label it as a bad idea for everyone. It just depends on the amount of research you’ve done before and (which sort of goes hand in hand) how sure you are that you’re looking for a career in academia. A lot of good programs seem to admit people straight out of undergrad or one year removed en masse, so I would think about it more in terms of personal reasons rather than admissions reasons.
Bottom line: If you know that that is the path you want to take, go ahead and try applying right now. While it’s definitely right to say that a lot of people develop during the time between their undergrad and PhD, I’ve been told by professors that there’s no reason for delaying the process. I mean a great way to get research experience and refine your interest is by being in a grad program. You might have to work a little harder if you enter with less experience, but that shouldn’t keep you from applying.
That being said, there are great reasons to wait. I for example wish I would’ve had the courage to work for a year and take some time for my mental health instead of jumping from one high pressure situation into the next one. I got a masters degree along the way, but studied in Europe, so I only entered with four years of prior education as well. In the end the decision is (and should be) personal. Grad school is a lot harder than your previous education was, so no, I didn’t feel properly prepared. But neither did those who had worked in between. Nobody did at my school. Just figure out if this is what you want to do and if you’re ready to start that commitment at this point of our life.
This is asssuming that you'd have a strong profile to apply right away. If not, get some research experience just become a stronger candidate. It’s hard enough to find a job after anyways, so being at a more renowned school might pay off in the long run.