Create a subset of your 400,000 pages based on the location or category that best suits your website. The number of pages in your subset depends on you but the ideal would be 5% of the total number of pages. Submit these pages to Google in a sitemap or in several sitemaps.
To create a sitemap, read this article. Debugging indexing problem.
Overtime google will explore and index these pages and if there are problems, try to solve them and keep working constantly on the elements on the page and off page.
The learning you get from the subset can then be implemented on the rest of your pages. The ideal would be that you publish the pages in batches and not at all at once