An overstay of less than 180 days on an ESTA/VWP entry will not trigger a ban - it's only once you have overstayed by 180 days that a ban will kick in. Your total stay was over 180 days, but only the 4 months counts as an overstay, not the entire stay.
However, once you've overstayed by even a single day you are no longer able to enter the US under the Visa Waiver Program - your existing ESTA will immediately be invalid, and any future attempts to obtain an ESTA will normally be refused as you've already discovered.
Which means you need a visa to enter the US.
To answer your specific question, yes, countless people have been able to obtain a B2 visa after an overstay. And at the same time, countless people have been refused for B2 visas after an overstay.
When determining your eligibility for a US visa, the consulate staff take the approach of presuming that you WILL break the conditions of the visa, and then rely on you to provide sufficient evidence to convince them that you will not. As someone that has already broken the conditions of the VWP, it's going to take a lot more to convince the officials that you will not break the visa conditions than it would for the next person. So your previous refusal almost certainly wasn't directly due to your overstay - but due to that fact that with that in your history, you did not provide sufficient evidence that you would not overstay again.
For your next application, you need to take as much proof as possible of ties to your home country, and of the fact that you will return there within the period of the stay granted. This could include things like proof of ownership of property, a letter from your employer granting leave for a period of X weeks, proof of enrollment in a school/university/etc - or anything else that will act as some form of proof that you will return to your home country in a short period of time.
It is certainly possible that you will simply not be able to provide sufficient documentation to convince the staff, in which case your application will be refused, and there is likely nothing further you can do about it other than to try again in a few years.