General rule of thumb is luggage can never go unaccompanied. So as long as your flight doesnt leave without your luggage you should be able to check you luggage all the way through.
I have done a flight where I went AUH-KHI-DOH-KIX-NRT with an 18 hour layover in DOH and using EY and QR for the flights. Luggage was checked in all the way through to NRT and arrived.
So luggage aint an issue, I dont recommend staying in Doha tbh. If you can avoid the transit then just forget it about it and leave.