just my personal opinion !
1) I think that pending H1-H4 change or H1 transfer gives you 'legality' of staying in US until decision is made. However, petition should be filed (not actually filed - but should REACH USCIS) while you are still in legal status (non expired H-1).
2) Not sure if you need to file H-4 for few days of your gap between two H-1s. But you do not have any 'grace' period after your H-1 expires (as per my former lawyer), so to be in status probably you should cover that.
3) My experience: My spouse was on H-1 and company (A) was going down. We filed then H-1 to H-4 based on my H-1, it was easy, we just filled some form (available from internet) and gave to my university, which filed that together with my H-1 (transfer at that time). We had to pay the fee and we simply attached a check. We also got a letter from company A that spouse was on a non-paid leave, this was needed to keep legal status since company A had no money to pay the payroll.
4) This is true that if you have 2 pending petitions, and whichever one is approved later - is giving you the status. In our case, for my spouse there was 2 petitions pending, one H-1 extension filed in dec 2002 pending, another H-4 filed in may 2003, both were pending - then H-4 (through my university) was approved in June 2003 (effective from May), and then H-1 (through company A) extension was approved in August 2003.
We all filed I-485 in Sept 2003, thinking that spouse was on H-4 and not aware on approved H-1 transfer by company A, since company A went down in May. But I worried about that pending H-1 extension and I tried to find out what happened, it was really hard but finally I got that information about its approval in August. Only in Jan 2004 I was able to get a copy of approval, and I got a letter from company A that they existed until sept 2003, that they officially fired everybody from Sept 1, and that they INFORMED my spouse about that only later, in Jan 2004.
Thus, since H-1 transfer was approved later than H-4 - spouse actually was on H-1 since august (? or maybe effective back since feb 2003), and we were not aware of this and submitted I-485 with H-4 info.
I collected all documents on that explaining situation and mailed to USCIS asking to change H-4 starting date for my spouse from may to sept 1st, then all would be in order: until Sept 1st spouse was on H-1 pending transfer but unpaid leave, then let go and hence be on H-4 through me, from sept 1 to sept 28 when we applied for I-485 and since spouse was in AOS (with EAD) and I continued on H-1.
USCIS replied with another H-1 for my spouse with sept 1 date! So they understood that sometimes situation is not easy and you can not control things even if you want to.
Complicated story... but in your case, you may apply for H-4 and then if it gets approved later than H-1 transfer - then apply again for H-1 transfer or ask to change H-1 transfer approval date (not sure).