Is it okay/possible to quit a PhD program in the 4th year and apply someplace else?
Yes, it is is a bad idea.  (I will give you a definite answer.)

You need to finish up.  You are too far down the road.


It is very natural to be close to the end and look at your Ph.D. and think you could have done more ("I coulda been a contender.")  But you need to resist the impulse.  The first 3 years are sunk. You can't go back.
You have the rest of your life to do useful science.  Just collect the sheepskin (even if your advisor wasn't that smart or your project that momentous.)  You can go after good future work just as easily with a Ph.D. as without one.  In many ways easier and at at least marginally higher pay.  
Your goal is to be an independent researcher.  It is normal for grad students to transition to this during their career.  Some of them lag and still need supervision as postdocs, but some are basically great indepedent scientists halfway through the Ph.D.  Do NOT hang out in the comfortable quasi-adolescent world of studentdom.  Get that Ph.D. to show you are an independent thinker (it is the credential for that) and move on.
There are a LOT of ways that a new Ph.D. could go wrong. (bad advisor, money, experiments not working, etc.) Yeah, this guy is a nebish.  But at least you are not working with a jerk (and there are plenty of tin pot dictators in academia).  Count your lucky stars and just move on and do your own thing.  Sure he wasn't the perfect father figure mentor. But you need to do your own thing.  Maybe you can be a better mentor for others when it is your turn or you can be a better scientist/engineer.
It WILL look bad that you made this switch, especially at this stage in your career.


Net/net:  let the dissatisfaction (very common, I had it too) to be motivation to finish early.  Not to try to recreate a better experience and stay longer.  

Anecdote:  I had same feelings during my Ph.D.  Was basically done with my work 2 years in but dissatisfied...advisor was nice but not a cutting edge scientist.  We got along mostly but clashed at times since I really didn't need him for anything.  He gave me one fair piece of advice (graduate early), but I failed to take it.  Hung out for 4 years and did an extra project when I really could have been out in 3 (or faster).  And I had money saved from previous work.  And it is a nice lifestyle in some ways to be a grad student (beats working).  But same time, it was a waste...should have moved on faster.  

You are actually putting yourself in way more danger by moving to something new and having some 7 year plus of Ph.D. time.  Even from a personal perspective you are not getting any younger and you won't have the same fire in your belly at 50 as at 30.  Move on and don't spend your whole youth in student-dom.