Eh, a lot to unpack here:
1) despite looking at XXIth century map, medieval Hungary was a lot larger than Late Medieval Poland who was left as husk of it's former self by disastrous reign of Vladislaus I the Elbow-High
2) center of Louis's monarchy was Hungary, not Poland, so Polish privileges were kind of irrelevant for him, he got the money he needed from mines in Upper Hungary (modern-day Slovakia) anyways, as these were biggest gold deposits in medieval Europe
3) Poland under continuing Louis's regime would most likely resemble Croatia, another Catholic Slavic kingdom which went in PU with Hungary and became it's part (
@Jan Olbracht thinks that this analogy is not grounded, because Poland had more population than Croatia and as such would be able to matter more than Croatia did).
Basically, Poland becoming a major regional power wasn't fated, especially after fragmentation period and it's outcome, that's the tragedy of Poland, when it got the opportunity to expand due to Jogaila's benevolence, it began descent towards anarchy and the possible late medieval PODs stopping said descent usually tie Poland to Hungary more, brining back the opportunity to end up like Croatia.
And btw szlachta as fully formed group didn't exist yet, the medieval knightly estate wasn't nearly as much defined as later szlachta.
So Louis I having a son creates mega-powerful Hungary, if anything.