Lucid Motors reached an agreement to become a publicly traded company through a merger with special-purpose acquisition company Churchill Capital IV Corp., in the largest deal yet between a blank-check company and an electric vehicle startup.