Not a chance 40k, this would be a 20k, max 25k crowd all day long, Palace would not be a big attraction even as a PL established club / fa cup winners. They would travel in big numbers 'Daaaablin' always a treat for UK visitors, but wouldn't think Shels would muster up more than a cup final crowd, 10k max maybe, then you are depending on floating fans. If i was them i'd stick to Tallaght. There is also a UEFA rule I think, you need to nominate and stick to the ground in most cases.
Dundalk played one game at the Aviva in 2020 EL group v Arsenal but that was due to Tallaght not available, no fear on crowds going that day, attendance was zero - covid.