I assigned the host team seed 0 (this is 2022 so it's Qatar), highest 15 ranked teams 1, next 16 highest 2, next 16 3, and the next 16 4. I think I followed one of your examples.
There are a maximum of 24 European teams and 13 for Africa, Asia, NA, 10 for SA, and 2 for Oceania. I haven't personally tried to do a draw but it the parameters didn't work wouldn't the test just crash?