Magnetic cooling and on-chip thermometry for nanoelectronics below 10 mK