I managed to solve the problem.
Error code 49187 appears to be an internal error in the structure of the APFS that occurred during the file system installation.
I couldn't find a solution to fix it, so I could only recover the following steps:
#Step 1: I made a Time Machine backup (otherwise I just updated my existing one)
#Step 2: I restarted the computer and selected the installation option from the USB installer
#Step 3: I then run the following command in the terminal to list the disks:
diskutil list
(The terminal can be found as a menu item once the installer boots)
#Step 4: I selected the disk on which the macOS is installed (in this case, this was "disk1")
#Step 5: Then I ran the following command (To convert an APFS container into a free space, you must first delete the container):
diskutil apfs deleteContainer disk1
#Step 6: Then restore the system using Time Machine
After restoring the system, I was able to partition without problems.
If Boot Camp Assistant fails trying to partition a Mojave OSX volume after a clean install, giving an unhelpful message to run Disk Utility (which finds no problem), it is a "silent" 49187 error. Seems to be triggered by a Bootcamp partition that is much larger than the OSX partition. Confirmation comes by trying to create partitions with the same size in Disk Utility, which reports the 49187 error. This Time Machine backup/wipe/restore procedure cures the silent 49187 error and lets Boot Camp Assistant perform the partition.