Taiwan’s military could consider recruiting foreign fighters to address a troop shortage as pressure from China grows.