Iridates with the 5d4 electronic configuration have attracted recent interest due to reports of magnetically ordered ground states despite longstanding expectations that their strong spin-orbit coupling would generate a J=0 electronic ground state for each Ir5+ ion. The major focus of prior research has been on the double perovskite iridates Ba2YIrO6 and Sr2YIrO6, where the nature of the ground states (i.e., ordered vs nonmagnetic) is still controversial. Here, we present neutron powder diffraction, high-energy-resolution fluorescence-detected x-ray absorption spectroscopy (HERFD-XAS), resonant inelastic x-ray scattering (RIXS), magnetic susceptibility, and muon spin relaxation data on the related double perovskite iridates Ba2LuIrO6, Sr2LuIrO6, Ba2ScIrO6, and Sr2ScIrO6 that enable us to gain a general understanding of the electronic and magnetic properties for this family of materials. Our HERFD-XAS and RIXS measurements establish J=0 electronic ground states for the Ir5+ ions in all cases, with similar values for Hund's coupling JH and the spin-orbit coupling constant λSOC. Our bulk susceptibility and muon spin relaxation data find no evidence for long-range magnetic order or spin freezing, but they do exhibit weak magnetic signals that are consistent with extrinsic local moments. Our results indicate that the large λSOC is the key driving force behind the electronic and magnetic ground states realized in the 5d4 double perovskite iridates, which agrees well with conventional wisdom.