Maybe a mnemonic device related to the shape of the numbers can help.
I always see a 4 as more angular and sharp, so the pronunciation is sharper too, like a hiccup. よっか
But 8 is more fluid, looks like the sign for eternity if you flip it horizontally, and so the sound is smoother and longer. ようか
That's how I've always checked that I am saying the right one.
I hope you see what I mean and it helps.
I suppose many foreigen learners prounounce '四日(よっか）' in 2 moras. Yo/Ka,
however it has 3 molas. Yo/'/KA.
八日（ようか） has also 3 molas, YO/U/KA or YO/O/KA.
it is not YOKA(2 molas)
**** How to clarify in communication.
Use your fingers,
Or you can say HACHI/NICHI , that also means 八日
The Pronunciation is a little different!
That's very simple.
We also repeat saying YON and HACHI when you need to make sure the other person has not misunderstood you for an important appointment. There is no use in repeating two similiar sounding words. Yokka and Yohka.
The best way is to say, ICHI NII SAN SHII no SHI des! Or HACHI-GOH ROKU SHICHI HACHI no HACHI des.
So it is the same for us natives. We repeat after Shichi or Shi 7/4 and say, Yokka dewanaku, NANANICHI des.